summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2018-11-24 21:14:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-12 19:47:08 +0100
commit1f16ac59e7e5dd6f001121f2e5ee0a0869a47176 (patch)
tree80dcab7a17d722a18236d33b14903d804635f6b7 /drivers/ata
parent710e1e561630975f934214c0196133fa12a86514 (diff)
downloadlinux-stable-1f16ac59e7e5dd6f001121f2e5ee0a0869a47176.tar.gz
linux-stable-1f16ac59e7e5dd6f001121f2e5ee0a0869a47176.tar.bz2
linux-stable-1f16ac59e7e5dd6f001121f2e5ee0a0869a47176.zip
sata_rcar: fix deferred probing
[ Upstream commit 9f83cfdb1ace3ef268ecc6fda50058d2ec37d603 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_rcar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 10ecb232245d..03867f539f3a 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -895,7 +895,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);