lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 144/229] phy: qualcomm: call clk_disable_unprepare in the error handling
    Date
    From: Dongliang Mu <mudongliangabcd@gmail.com>

    [ Upstream commit c3966ced8eb8dc53b6c8d7f97d32cc8a2107d83e ]

    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.

    Fixes: 0b56e9a7e835 ("phy: Group vendor specific phy drivers")
    Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
    Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://lore.kernel.org/r/20220914051334.69282-1-dzm91@hust.edu.cn
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/phy/qualcomm/phy-qcom-usb-hsic.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c
    index c110563a73cb..00926df4bc5b 100644
    --- a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c
    +++ b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c
    @@ -57,8 +57,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)
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-10-24 21:36    [W:4.097 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site