Skip to content

Commit

Permalink
sata_rcar: fix deferred probing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and Jens Axboe committed Dec 10, 2018
1 parent 614c61a commit 9f83cfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/ata/sata_rcar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f83cfd

Please sign in to comment.