mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
sata_highbank: fix deferred probing
[ Upstream commit4a24efa16e] 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:9ec36cafe4("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>
This commit is contained in:
parent
45d2d67833
commit
9df79fd17b
|
|
@ -469,10 +469,12 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq <= 0) {
|
if (irq < 0) {
|
||||||
dev_err(dev, "no irq\n");
|
dev_err(dev, "no irq\n");
|
||||||
return -EINVAL;
|
return irq;
|
||||||
}
|
}
|
||||||
|
if (!irq)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
|
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
|
||||||
if (!hpriv) {
|
if (!hpriv) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user