lkml.org 
[lkml]   [2018]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.18 045/126] pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux
    Date
    From: YueHaibing <yuehaibing@huawei.com>

    [ Upstream commit 69f8455f6cc78fa6cdf80d0105d7a748106271dc ]

    'ret' should be returned while pmic_mpp_write_mode_ctl fails.

    Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode")
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
    index 6556dbeae65e..418bc40df7ca 100644
    --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
    +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
    @@ -319,6 +319,8 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function,
    pad->function = function;

    ret = pmic_mpp_write_mode_ctl(state, pad);
    + if (ret < 0)
    + return ret;

    val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT;

    --
    2.17.1
    \
     
     \ /
      Last update: 2018-11-01 00:38    [W:3.240 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site