* [PATCH v1] amba: Fix pclk leak on runtime resume failure
@ 2026-07-07 18:22 Yuho Choi
0 siblings, 0 replies; only message in thread
From: Yuho Choi @ 2026-07-07 18:22 UTC (permalink / raw)
To: Russell King
Cc: Ulf Hansson, Claudiu Beznea, Mathieu Poirier, Danilo Krummrich,
Kees Cook, linux-kernel, Yuho Choi
amba_pm_runtime_resume() enables the AMBA pclk before calling the
driver runtime resume callback. If that callback fails, the function
returns with pclk still enabled.
Disable pclk on pm_generic_runtime_resume() failure, matching the clock
state rollback expected by the runtime suspend/resume path.
Fixes: 92b97f0aaccb ("PM: add runtime PM support to core Primecell driver")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
---
drivers/amba/bus.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index d721d64a9858..5a36463f1438 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -389,7 +389,15 @@ static int amba_pm_runtime_resume(struct device *dev)
return ret;
}
- return pm_generic_runtime_resume(dev);
+ ret = pm_generic_runtime_resume(dev);
+ if (ret && dev->driver) {
+ if (pm_runtime_is_irq_safe(dev))
+ clk_disable(pcdev->pclk);
+ else
+ clk_disable_unprepare(pcdev->pclk);
+ }
+
+ return ret;
}
#endif /* CONFIG_PM */
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-07 18:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 18:22 [PATCH v1] amba: Fix pclk leak on runtime resume failure Yuho Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox