Skip to content

Commit e7a376e

Browse files
Sergey Shtylyovgregkh
authored andcommitted
pata_rb532_cf: fix deferred probing
[ Upstream commit 2d3a62f ] 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: 9ec36ca ("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>
1 parent 9df79fd commit e7a376e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/ata/pata_rb532_cf.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)
115115
}
116116

117117
irq = platform_get_irq(pdev, 0);
118-
if (irq <= 0) {
118+
if (irq < 0) {
119119
dev_err(&pdev->dev, "no IRQ resource found\n");
120-
return -ENOENT;
120+
return irq;
121121
}
122+
if (!irq)
123+
return -EINVAL;
122124

123125
gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_IN);
124126
if (IS_ERR(gpiod)) {

0 commit comments

Comments
 (0)