diff options
author | Sergey Shtylyov <s.shtylyov@omprussia.ru> | 2021-03-15 14:46:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:15:47 +0200 |
commit | 97c9919de33b7b100800a513016842720bbb2822 (patch) | |
tree | 1bf2b0b2d59b475b3b17920a16b3dcf86293b0d8 /drivers/ata | |
parent | 48715b7f8560f6a5e3fff0c4f2b7c413ee999c15 (diff) | |
download | linux-stable-97c9919de33b7b100800a513016842720bbb2822.tar.gz linux-stable-97c9919de33b7b100800a513016842720bbb2822.tar.bz2 linux-stable-97c9919de33b7b100800a513016842720bbb2822.zip |
pata_rb532_cf: fix deferred probing
[ Upstream commit 2d3a62fbae8e5badc2342388f65ab2191c209cc0 ]
The driver overrides the error codes returned by platform_get_irq() to
-ENOENT, 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")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Link: https://lore.kernel.org/r/771ced55-3efb-21f5-f21c-b99920aae611@omprussia.ru
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/pata_rb532_cf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 653b9a0bf727..0416a390b94c 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c @@ -120,10 +120,12 @@ static int rb532_pata_driver_probe(struct platform_device *pdev) } irq = platform_get_irq(pdev, 0); - if (irq <= 0) { + if (irq < 0) { dev_err(&pdev->dev, "no IRQ resource found\n"); - return -ENOENT; + return irq; } + if (!irq) + return -EINVAL; pdata = dev_get_platdata(&pdev->dev); if (!pdata) { |