Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sata_rcar: fix deferred probing

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 <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Sergei Shtylyov and committed by
Jens Axboe
9f83cfdb 614c61a6

+3 -1
+3 -1
drivers/ata/sata_rcar.c
··· 891 891 int ret = 0; 892 892 893 893 irq = platform_get_irq(pdev, 0); 894 - if (irq <= 0) 894 + if (irq < 0) 895 + return irq; 896 + if (!irq) 895 897 return -EINVAL; 896 898 897 899 priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);