summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Gu <ustc.gu@gmail.com>2026-03-25 19:23:58 +0300
committerVinod Koul <vkoul@kernel.org>2026-05-10 15:04:18 +0300
commita4058c09dd6e28ec33316fd6eb45ddae4cab1f31 (patch)
treed9a640a7b163cf923dda58e85a3039c506de7276
parentc2cd08e8f150738515c8df415ad7ecfa3d38124a (diff)
downloadlinux-a4058c09dd6e28ec33316fd6eb45ddae4cab1f31.tar.xz
phy: spacemit: Remove incorrect clk_disable() in spacemit_usb2phy_init()
When clk_enable() fails, the clock was never enabled. Calling clk_disable() in this error path is incorrect. Remove the spurious clk_disable() call from the error handling in spacemit_usb2phy_init(). Fixes: fe4bc1a08638 ("phy: spacemit: support K1 USB2.0 PHY controller") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Reviewed-by: Ze Huang <huang.ze@linux.dev> Link: https://patch.msgid.link/20260326-k1-usb3-v1-1-0c2b6adf5185@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/phy/spacemit/phy-k1-usb2.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/phy/spacemit/phy-k1-usb2.c b/drivers/phy/spacemit/phy-k1-usb2.c
index 9215d0b223b2..e8c1e26428a9 100644
--- a/drivers/phy/spacemit/phy-k1-usb2.c
+++ b/drivers/phy/spacemit/phy-k1-usb2.c
@@ -97,7 +97,6 @@ static int spacemit_usb2phy_init(struct phy *phy)
ret = clk_enable(sphy->clk);
if (ret) {
dev_err(&phy->dev, "failed to enable clock\n");
- clk_disable(sphy->clk);
return ret;
}