[PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup
Bui Duc Phuc
phucduc.bui at gmail.com
Fri Aug 7 03:11:44 PDT 2026
Hi Geert,
Thank you for your feedback.
> > irq = platform_get_irq_optional(pdev, i);
> > - if (irq < 0)
> > + if (irq < 0 && irq != -ENXIO)
> > return irq;
> >
>
> So the code may continue using -ENXIO as an interrupt number (and fail)?
>
Yes, you are right. We should probably handle it similarly to:
https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/thermal/renesas/rcar_thermal.c#L422
and only assign the IRQ when the return value is positive:
if (ret > 0)
irq = ret;
> Why is this change needed at all?
> The caller of rcar_gen3_thermal_request_irqs() knows how to handle
> failures, as IRQs are optional.
>
Regarding the caller, I only found rcar_gen3_thermal_request_irqs()
being called here:
https://elixir.bootlin.com/linux/v7.2-rc6/source/drivers/thermal/renesas/rcar_gen3_thermal.c#L530
It does not appear to handle the error return there, so I don't think
the caller currently handles these failures explicitly.
Best regards,
Phuc
More information about the linux-arm-kernel
mailing list