[PATCH] thermal: rcar-thermal: fix runtime PM cleanup
From: Jiawen Liu
Date: Tue Aug 18 2026 - 09:21:03 EST
Update rcar_thermal_probe() for the confirmed driver lifecycle defect.
Keep the change limited to the concrete operation shown in the final
patch.
Signed-off-by: jiawen <1298662399@xxxxxx>
---
diff --git a/drivers/thermal/renesas/rcar_thermal.c b/drivers/thermal/renesas/rcar_thermal.c
--- a/drivers/thermal/renesas/rcar_thermal.c
+++ b/drivers/thermal/renesas/rcar_thermal.c
@@ -414,7 +414,12 @@
common->dev = dev;
pm_runtime_enable(dev);
- pm_runtime_get_sync(dev);
+ ret = pm_runtime_get_sync(dev);
+ if (ret < 0) {
+ pm_runtime_put_noidle(dev);
+ pm_runtime_disable(dev);
+ return ret;
+ }
for (i = 0; i < chip->nirqs; i++) {
int irq;