* [PATCH] usb: host: ohci-exynos: Propagate clock errors from resume
@ 2026-09-06 3:40 Pengpeng Hou
2026-09-06 6:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-09-06 3:40 UTC (permalink / raw)
To: Alan Stern, Greg Kroah-Hartman
Cc: Pengpeng Hou, Krzysztof Kozlowski, Peter Griffin, Alim Akhtar,
Jingoo Han, linux-usb, linux-arm-kernel, linux-samsung-soc,
linux-kernel
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 <hppiscas@163.com>
---
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: host: ohci-exynos: Propagate clock errors from resume
2026-09-06 3:40 [PATCH] usb: host: ohci-exynos: Propagate clock errors from resume Pengpeng Hou
@ 2026-09-06 6:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-06 6:36 UTC (permalink / raw)
To: Pengpeng Hou, Alan Stern, Greg Kroah-Hartman
Cc: Peter Griffin, Alim Akhtar, Jingoo Han, linux-usb,
linux-arm-kernel, linux-samsung-soc, linux-kernel
On 06/09/2026 05:40, Pengpeng Hou wrote:
> exynos_ohci_resume() ignores clk_prepare_enable() and proceeds to PHY
No, clk_prepare_enable() is not ignored. It is called.
What is ignored is the return status, because it does not matter. It
cannot possibly fail, it is simple MMIO access within internals of the SoC.
Anyway, please rephrase the commit msg.
> 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")
IMO, I have doubts whether this is a fix, because actual error cannot
happen in practice.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-06 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-06 3:40 [PATCH] usb: host: ohci-exynos: Propagate clock errors from resume Pengpeng Hou
2026-09-06 6:36 ` Krzysztof Kozlowski
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®