提交 6b08e36b 编写于 作者: A Axel Lin 提交者: Kishon Vijay Abraham I

phy: rockchip-usb: Fixup rockchip_usb_phy_power_on failure path

If rockchip_usb_phy_power() fails, we need to call clk_disable_unprepare()
before return. This is to ensure we have balanced clk_enable/disable calls.
Also remove unneeded ret checking in rockchip_usb_phy_power_off.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
上级 a5e5d3c0
......@@ -61,8 +61,6 @@ static int rockchip_usb_phy_power_off(struct phy *_phy)
return ret;
clk_disable_unprepare(phy->clk);
if (ret)
return ret;
return 0;
}
......@@ -78,8 +76,10 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
/* Power up usb phy analog blocks by set siddq 0 */
ret = rockchip_usb_phy_power(phy, 0);
if (ret)
if (ret) {
clk_disable_unprepare(phy->clk);
return ret;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册