[PATCH v2 1/2] thermal/drivers/rcar_gen3: Handle -ENXIO from optional IRQ lookup
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Mon Aug 10 04:18:40 PDT 2026
From: bui duc phuc <phucduc.bui at gmail.com>
rcar_gen3_thermal_request_irqs() may return -ENXIO when no optional
IRQ is available. The caller currently treats all negative return values
the same way, disabling hardware trip-point support and continuing probe.
Distinguish -ENXIO from other errors so that the existing behavior is
preserved when the optional IRQ is absent, while errors such as
-EPROBE_DEFER, -EINVAL, and other failures are propagated to the
caller.
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
Link v1 :
https://lore.kernel.org/all/20260807093058.42840-1-phucduc.bui@gmail.com/
Changes in v2:
- Update the commit message.
- Move error handling to the caller.
drivers/thermal/renesas/rcar_gen3_thermal.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/renesas/rcar_gen3_thermal.c b/drivers/thermal/renesas/rcar_gen3_thermal.c
index 94804816e9e1..04a57ff724f4 100644
--- a/drivers/thermal/renesas/rcar_gen3_thermal.c
+++ b/drivers/thermal/renesas/rcar_gen3_thermal.c
@@ -527,8 +527,11 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
priv->info = of_device_get_match_data(dev);
platform_set_drvdata(pdev, priv);
- if (rcar_gen3_thermal_request_irqs(priv, pdev))
+ ret = rcar_gen3_thermal_request_irqs(priv, pdev);
+ if (ret == -ENXIO)
priv->ops.set_trips = NULL;
+ else if (ret)
+ return ret;
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
--
2.43.0
More information about the linux-arm-kernel
mailing list