[PATCH] usb: renesas_usbhs: Fix runtime PM leak in usbhsc_power_ctrl()

From: Wentao Liang

Date: Wed Sep 16 2026 - 13:08:23 EST


usbhsc_power_ctrl() takes a runtime PM usage count with
pm_runtime_get_sync() when enabling the controller. If the subsequent
usbhsc_clk_prepare_enable() call fails, the function returns without
dropping that usage count, so the device's runtime PM usage count is
leaked and the device can never suspend.

Put the runtime PM reference back with pm_runtime_put_sync() before
returning on the clock enable failure path, mirroring the disable path
of the function.

Fixes: 3df0e240caba6 ("usb: renesas_usbhs: Add multiple clocks management")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
drivers/usb/renesas_usbhs/common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 8c93bde4b816..187d6298c265 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -412,8 +412,10 @@ static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable)
pm_runtime_get_sync(dev);

/* enable clks */
- if (usbhsc_clk_prepare_enable(priv))
+ if (usbhsc_clk_prepare_enable(priv)) {
+ pm_runtime_put_sync(dev);
return;
+ }

/* enable platform power */
usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable);
--
2.34.1