Skip to content

Commit 9f83cfd

Browse files
Sergei Shtylyovaxboe
authored andcommitted
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: 9ec36ca ("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>
1 parent 614c61a commit 9f83cfd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/ata/sata_rcar.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
891891
int ret = 0;
892892

893893
irq = platform_get_irq(pdev, 0);
894-
if (irq <= 0)
894+
if (irq < 0)
895+
return irq;
896+
if (!irq)
895897
return -EINVAL;
896898

897899
priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);

0 commit comments

Comments
 (0)