提交 2437a87e 编写于 作者: S Shang XiaoJing 提交者: sanglipeng

phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on()

stable inclusion
from stable-v5.10.166
commit 2a0156a4aaea97a270a388f7f561c668aeeabc96
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7TH9O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2a0156a4aaea97a270a388f7f561c668aeeabc96

--------------------------------

[ Upstream commit 5daba914 ]

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

Fixes: 0e08d2a7 ("phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy")
Signed-off-by: NShang XiaoJing <shangxiaojing@huawei.com>
Link: https://lore.kernel.org/r/20221205115823.16957-1-shangxiaojing@huawei.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 365e7aeb
...@@ -467,8 +467,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy) ...@@ -467,8 +467,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy)
return ret; return ret;
ret = property_enable(base, &rport->port_cfg->phy_sus, false); ret = property_enable(base, &rport->port_cfg->phy_sus, false);
if (ret) if (ret) {
clk_disable_unprepare(rphy->clk480m);
return ret; return ret;
}
/* waiting for the utmi_clk to become stable */ /* waiting for the utmi_clk to become stable */
usleep_range(1500, 2000); usleep_range(1500, 2000);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册