Re: [PATCH] ipmi: si: Handle errors from optional IRQ lookup
From: Corey Minyard
Date: Mon Aug 17 2026 - 07:31:10 EST
On Mon, Aug 17, 2026 at 05:51:50PM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> platform_get_irq_optional() returns a positive IRQ number on success or
> a negative error code on failure. For an optional IRQ, -ENXIO indicates
> that no optional IRQ is available. Other errors, such as -EPROBE_DEFER
> and -EINVAL, should be propagated so that the caller can handle them
> appropriately.
>
> Propagate negative errors other than -ENXIO.
The driver works without interrupts, and there may be cases where
-EINVAL or -EPROBE_DEFER gets returned due to invalid configuration.
This will break those systems.
So no.
-corey
>
> Fixes: 39851b7e580a ("ipmi: si: Use platform_get_irq_optional() to retrieve interrupt")
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
> ---
> drivers/char/ipmi/ipmi_si_platform.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c
> index bdc481ce1302..04b3e205470f 100644
> --- a/drivers/char/ipmi/ipmi_si_platform.c
> +++ b/drivers/char/ipmi/ipmi_si_platform.c
> @@ -198,6 +198,8 @@ static int platform_ipmi_probe(struct platform_device *pdev)
> io.slave_addr = slave_addr;
>
> io.irq = platform_get_irq_optional(pdev, 0);
> + if (io.irq < 0 && io.irq != -ENXIO)
> + return io.irq;
> if (io.irq > 0)
> io.irq_setup = ipmi_std_irq_setup;
> else
> --
> 2.43.0
>