Message ID | 20220914051334.69282-1-dzm91@hust.edu.cn |
---|---|
State | New |
Headers | show |
Series | phy: qualcomm: call clk_disable_unprepare in the error handling | expand |
On 14-09-22, 13:13, Dongliang Mu wrote: > From: Dongliang Mu <mudongliangabcd@gmail.com> > > Smatch reports the following error: > > drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() > warn: 'uphy->cal_clk' from clk_prepare_enable() not released on lines: > 58. > drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() > warn: 'uphy->cal_sleep_clk' from clk_prepare_enable() not released on > lines: 58. > drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() > warn: 'uphy->phy_clk' from clk_prepare_enable() not released on lines: > 58. > > Fix this by calling proper clk_disable_unprepare calls. Applied, thanks
diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c index 716a77748ed8..20f6dd37c7c1 100644 --- a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c +++ b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c @@ -54,8 +54,10 @@ static int qcom_usb_hsic_phy_power_on(struct phy *phy) /* Configure pins for HSIC functionality */ pins_default = pinctrl_lookup_state(uphy->pctl, PINCTRL_STATE_DEFAULT); - if (IS_ERR(pins_default)) - return PTR_ERR(pins_default); + if (IS_ERR(pins_default)) { + ret = PTR_ERR(pins_default); + goto err_ulpi; + } ret = pinctrl_select_state(uphy->pctl, pins_default); if (ret)