summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShang XiaoJing <shangxiaojing@huawei.com>2022-12-05 19:58:23 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 07:49:38 +0100
commit7deac1fad44c279386162591307dc1485c643115 (patch)
treedb2e9b48e5224515625c611db9228312574cc815 /drivers
parentaae109414a57ab4164218f36e2e4a17f027fcaaa (diff)
downloadlinux-stable-7deac1fad44c279386162591307dc1485c643115.tar.gz
linux-stable-7deac1fad44c279386162591307dc1485c643115.tar.bz2
linux-stable-7deac1fad44c279386162591307dc1485c643115.zip
phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on()
[ Upstream commit 5daba914da0e48950e9407ea4d75fa57029c9adc ] The clk_disable_unprepare() should be called in the error handling of rockchip_usb2phy_power_on(). Fixes: 0e08d2a727e6 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/phy/rockchip/phy-rockchip-inno-usb2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 5049dac79bd0..77c1c3ffaed7 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -477,8 +477,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);