Re: [PATCH 2/4] ipmi: bt-bmc: Handle -ENXIO from optional IRQ lookup
From: Corey Minyard
Date: Mon Aug 17 2026 - 07:44:26 EST
On Mon, Aug 17, 2026 at 05:50:39PM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> 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.
This is obviously wrong, it will pass -ENXIO into devm_request_irq()
if returned.
-corey
>
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
> ---
> 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
>