Thread (2 messages) flat view 2 messages, 2 authors, 2h ago
HOTtoday

[PATCH] usb: host: ohci-exynos: Propagate clock errors from resume

From: Pengpeng Hou <hidden>
Date: 2026-09-06 03:41:06
Also in: linux-samsung-soc, linux-usb, lkml
Subsystem: the rest, usb ohci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

exynos_ohci_resume() ignores clk_prepare_enable() and proceeds to PHY
and OHCI restoration.

Return a clock failure before enabling the PHY. The existing PHY failure
path continues to undo a successfully enabled clock.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: e864abed546f ("USB: ohci-exynos: add clock gating to suspend/resume")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <redacted>
---
 drivers/usb/host/ohci-exynos.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index cc5cb0900988..aa4eb9f9d69b 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -231,7 +231,9 @@ static int exynos_ohci_resume(struct device *dev)
 	struct exynos_ohci_hcd *exynos_ohci	= to_exynos_ohci(hcd);
 	int ret;
 
-	clk_prepare_enable(exynos_ohci->clk);
+	ret = clk_prepare_enable(exynos_ohci->clk);
+	if (ret)
+		return ret;
 
 	ret = exynos_ohci_phy_enable(dev);
 	if (ret) {
-- 
2.50.1 (Apple Git-155)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help