* [PATCH] thermal: rcar: handle runtime resume failures during probe
@ 2026-11-29 13:02 Jiawen Liu
0 siblings, 0 replies; only message in thread
From: Jiawen Liu @ 2026-11-29 13:02 UTC (permalink / raw)
To: Niklas Söderlund, Rafael J. Wysocki, Daniel Lezcano,
Geert Uytterhoeven, Magnus Damm
Cc: Zhang Rui, Lukasz Luba, linux-renesas-soc, linux-pm, linux-kernel
rcar_thermal_probe() ignores the synchronous runtime resume result and
continues to sensor MMIO and thermal-zone registration after the PM core
reports failure.
Use pm_runtime_resume_and_get(), which retains a usage reference only
after a successful resume. On failure, disable runtime PM and return the
original error before hardware initialization.
Fixes: 51d45d25948b ("thermal: rcar: add pm_runtime_xxx() support")
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
drivers/thermal/renesas/rcar_thermal.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/renesas/rcar_thermal.c b/drivers/thermal/renesas/rcar_thermal.c
index af6d09a75bb61..c6535b9cdd0fe 100644
--- a/drivers/thermal/renesas/rcar_thermal.c
+++ b/drivers/thermal/renesas/rcar_thermal.c
@@ -414,7 +414,11 @@ static int rcar_thermal_probe(struct platform_device *pdev)
common->dev = dev;
pm_runtime_enable(dev);
- pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret) {
+ pm_runtime_disable(dev);
+ return ret;
+ }
for (i = 0; i < chip->nirqs; i++) {
int irq;
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-29 14:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 13:02 [PATCH] thermal: rcar: handle runtime resume failures during probe Jiawen Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®