Message ID | 0e1e3f42-aaca-d5d2-0038-9945633ba0f8@omprussia.ru |
---|---|
State | New |
Headers | show |
Series | Explicitly deny IRQ0 in the libata drivers | expand |
Index: linux-block/drivers/ata/pata_bk3710.c =================================================================== --- linux-block.orig/drivers/ata/pata_bk3710.c +++ linux-block/drivers/ata/pata_bk3710.c @@ -317,6 +317,8 @@ static int __init pata_bk3710_probe(stru pr_err(DRV_NAME ": failed to get IRQ resource\n"); return irq; } + if (!irq) + return -EINVAL; base = devm_ioremap_resource(&pdev->dev, mem); if (IS_ERR(base))
If platform_get_irq() returns IRQ0 (considered invalid according to Linus) the driver blithely passes it to ata_host_activate() that treats IRQ0 as a sign that libata should use polling and thus complains about non-NULL IRQ handler passed to it. Deny IRQ0 right away, returning -EINVAL from the probe() method... Fixes: 76a40ca82f34 ("Add Palmchip BK3710 PATA controller driver.") Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru> --- drivers/ata/pata_bk3710.c | 2 ++ 1 file changed, 2 insertions(+)