spi: sh-msiof: fix deferred probing
diff mbox series

Message ID c705888d-128a-bf3a-7828-ce105b3665d4@cogentembedded.com
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series
  • spi: sh-msiof: fix deferred probing
Related show

Commit Message

Sergei Shtylyov Oct. 12, 2018, 7:48 p.m. UTC
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>

---
The patch is against the 'for-linus' branch of Mark Brown's 'spi.git' repo.

 drivers/spi/spi-sh-msiof.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

Index: spi/drivers/spi/spi-sh-msiof.c
===================================================================
--- spi.orig/drivers/spi/spi-sh-msiof.c
+++ spi/drivers/spi/spi-sh-msiof.c
@@ -1343,8 +1343,8 @@  static int sh_msiof_spi_probe(struct pla
 
 	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;
 	}