From: bui duc phuc <[email protected]>

platform_get_irq_optional() can return -ENXIO when no IRQ resource is
available, as well as other negative error codes.

The probe path supports running without an IRQ by falling back to
the timer. Treat -ENXIO as the no-IRQ case while propagating other
errors to the caller.

Signed-off-by: bui duc phuc <[email protected]>
---
 drivers/char/ipmi/bt-bmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index 7d3944bda8db..4c5457c88503 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -380,7 +380,7 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
        u32 reg;
 
        bt_bmc->irq = platform_get_irq_optional(pdev, 0);
-       if (bt_bmc->irq < 0)
+       if (bt_bmc->irq < 0 && bt_bmc->irq != -ENXIO)
                return bt_bmc->irq;
 
        rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED,
-- 
2.43.0



_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to