spi: sh-msiof: fix deferred probing
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Fri, 12 Oct 2018 19:48:22 +0000 (22:48 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 15 Oct 2018 11:15:44 +0000 (12:15 +0100)
Since commit 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
platform_get_irq() can return -EPROBE_DEFER. However, the driver overrides
an error returned by that function with -ENOENT which breaks the deferred
probing. Propagate upstream an error code returned by platform_get_irq()
and remove the bogus "platform" from the error message, while at it...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sh-msiof.c

index 101cd6aae2ea520afcac89671071cdabe2341f8f..30ea0a2068e094ab47822b63da58da4778858ee3 100644 (file)
@@ -1343,8 +1343,8 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
 
        i = platform_get_irq(pdev, 0);
        if (i < 0) {
-               dev_err(&pdev->dev, "cannot get platform IRQ\n");
-               ret = -ENOENT;
+               dev_err(&pdev->dev, "cannot get IRQ\n");
+               ret = i;
                goto err1;
        }