Commit a4058c09 authored by Felix Gu's avatar Felix Gu Committed by Vinod Koul
Browse files

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: fe4bc1a0 ("phy: spacemit: support K1 USB2.0 PHY controller")
Signed-off-by: default avatarFelix Gu <ustc.gu@gmail.com>
Reviewed-by: default avatarZe Huang <huang.ze@linux.dev>
Link: https://patch.msgid.link/20260326-k1-usb3-v1-1-0c2b6adf5185@gmail.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent c2cd08e8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
	}