Re: [PATCH 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration
From: Corey Minyard
Date: Mon Aug 17 2026 - 07:38:39 EST
On Mon, Aug 17, 2026 at 05:50:38PM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> Check and propagate the return value of bt_bmc_config_irq() instead of
> ignoring errors during probe.
>
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
> ---
> drivers/char/ipmi/bt-bmc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index a179d4797011..7d3944bda8db 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -436,7 +436,9 @@ static int bt_bmc_probe(struct platform_device *pdev)
> return rc;
> }
>
> - bt_bmc_config_irq(bt_bmc, pdev);
> + rc = bt_bmc_config_irq(bt_bmc, pdev);
> + if (rc)
> + return rc;
No, this will break the driver if the interrupt is not available. That
function is badly written (it should return the irq and the irq should
be set here) but if it encounters an error, it should use the timer.
-corey
>
> if (bt_bmc->irq >= 0) {
> dev_info(dev, "Using IRQ %d\n", bt_bmc->irq);
> --
> 2.43.0
>