diff mbox series

usb: dwc3: imx8mp: Fix smatch warning

Message ID 20231215143458.158810-1-himanshu.bhavani@siliconsignals.io (mailing list archive)
State Accepted
Commit c084af69a8f425b8cb56479ff0ea11e48aba0c62
Headers show
Series usb: dwc3: imx8mp: Fix smatch warning | expand

Commit Message

Himanshu Bhavani Dec. 15, 2023, 2:34 p.m. UTC
dwc3_imx8mp_pm_resume() warn: 'dwc3_imx->suspend_clk'
from clk_prepare_enable() not released

Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index a1e15f2fffdb..8ee448068503 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -363,8 +363,10 @@  static int __maybe_unused dwc3_imx8mp_pm_resume(struct device *dev)
 	}
 
 	ret = clk_prepare_enable(dwc3_imx->hsio_clk);
-	if (ret)
+	if (ret) {
+		clk_disable_unprepare(dwc3_imx->suspend_clk);
 		return ret;
+	}
 
 	ret = dwc3_imx8mp_resume(dwc3_imx, PMSG_RESUME);