Skip to content

Commit a4058c0

Browse files
outman119vinodkoul
authored andcommitted
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: fe4bc1a ("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>
1 parent c2cd08e commit a4058c0

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/phy/spacemit/phy-k1-usb2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ static int spacemit_usb2phy_init(struct phy *phy)
9797
ret = clk_enable(sphy->clk);
9898
if (ret) {
9999
dev_err(&phy->dev, "failed to enable clock\n");
100-
clk_disable(sphy->clk);
101100
return ret;
102101
}
103102

0 commit comments

Comments
 (0)