[PATCH 1/4] pata_bk3710: deny IRQ0
From: Sergey Shtylyov <hidden>
Date: 2021-03-21 18:55:22
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 <redacted>
---
drivers/ata/pata_bk3710.c | 2 ++
1 file changed, 2 insertions(+)
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))