[PATCH 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup
Geert Uytterhoeven
geert at linux-m68k.org
Fri Aug 7 02:44:48 PDT 2026
Hi Phuc,
On Fri, 7 Aug 2026 at 11:31, <phucduc.bui at gmail.com> wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
>
> platform_get_irq_optional() returns -ENXIO when the optional IRQ is not
> specified. Treat -ENXIO as a valid absence of an optional IRQ, while
> propagating other errors.
>
> Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
Thanks for your patch!
> --- a/drivers/thermal/renesas/rcar_gen3_thermal.c
> +++ b/drivers/thermal/renesas/rcar_gen3_thermal.c
> @@ -491,7 +491,7 @@ static int rcar_gen3_thermal_request_irqs(struct rcar_gen3_thermal_priv *priv,
>
> for (i = 0; i < 2; i++) {
> 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)?
Why is this change needed at all?
The caller of rcar_gen3_thermal_request_irqs() knows how to handle
failures, as IRQs are optional.
> irqname = devm_kasprintf(dev, GFP_KERNEL, "%s:ch%d",
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the linux-arm-kernel
mailing list