Skip to content

Commit 9df79fd

Browse files
Sergey Shtylyovgregkh
authored andcommitted
sata_highbank: fix deferred probing
[ Upstream commit 4a24efa ] 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") Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru> Link: https://lore.kernel.org/r/105b456d-1199-f6e9-ceb7-ffc5ba551d1a@omprussia.ru Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 45d2d67 commit 9df79fd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/ata/sata_highbank.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,12 @@ static int ahci_highbank_probe(struct platform_device *pdev)
469469
}
470470

471471
irq = platform_get_irq(pdev, 0);
472-
if (irq <= 0) {
472+
if (irq < 0) {
473473
dev_err(dev, "no irq\n");
474-
return -EINVAL;
474+
return irq;
475475
}
476+
if (!irq)
477+
return -EINVAL;
476478

477479
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
478480
if (!hpriv) {

0 commit comments

Comments
 (0)