Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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>

authored by

Shang XiaoJing and committed by
Vinod Koul
5daba914 ec4a1d93

+3 -1
+3 -1
drivers/phy/rockchip/phy-rockchip-inno-usb2.c
··· 485 485 return ret; 486 486 487 487 ret = property_enable(base, &rport->port_cfg->phy_sus, false); 488 - if (ret) 488 + if (ret) { 489 + clk_disable_unprepare(rphy->clk480m); 489 490 return ret; 491 + } 490 492 491 493 /* waiting for the utmi_clk to become stable */ 492 494 usleep_range(1500, 2000);