projects/linux·commit 9f83cfdb

sata_rcar: fix deferred probing

9f83cfdb · Sergei Shtylyov <[email protected]> · 2018-11-24 21:14:16 +03:00

The driver overrides the error codes returned by platform_get_irq() to
-EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe
permanently instead of the deferred probing. Switch to propagating the
error code upstream, still checking/overriding IRQ0 as libata regards it
as "no IRQ" (thus polling) anyway...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Commit
9f83cfdb1ace3ef268ecc6fda50058d2ec37d603
Parents
614c61a6

Changes

1 files changed · +3 −1

FileStatusAddDelContent
drivers/ata/sata_rcar.cmodified+3−1View file

drivers/ata/sata_rcar.c

View file
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 4b1ff5b..59b2317 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -891,7 +891,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
int ret = 0;
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
+ if (irq < 0)
+ return irq;
+ if (!irq)
return -EINVAL;
priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);