Skip to content

Commit

Permalink
phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockc…
Browse files Browse the repository at this point in the history
…hip_usb2phy_power_on()

The clk_disable_unprepare() should be called in the error handling of
rockchip_usb2phy_power_on().

Fixes: 0e08d2a ("phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20221205115823.16957-1-shangxiaojing@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Shang XiaoJing authored and Vinod Koul committed Jan 13, 2023
1 parent ec4a1d9 commit 5daba91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/phy/rockchip/phy-rockchip-inno-usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy)
return ret;

ret = property_enable(base, &rport->port_cfg->phy_sus, false);
if (ret)
if (ret) {
clk_disable_unprepare(rphy->clk480m);
return ret;
}

/* waiting for the utmi_clk to become stable */
usleep_range(1500, 2000);
Expand Down

0 comments on commit 5daba91

Please sign in to comment.