summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/qcom
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-09-20 01:58:18 +0000
committerLinus Walleij <linus.walleij@linaro.org>2018-09-21 08:17:43 -0700
commit69f8455f6cc78fa6cdf80d0105d7a748106271dc (patch)
treed5d8510363dccdc9ac6e632bc99c27b18c312f66 /drivers/pinctrl/qcom
parentc98b0d2db7d7256bb1db5d2726c75b9d0881bddc (diff)
pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux
'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>
Diffstat (limited to 'drivers/pinctrl/qcom')
-rw-r--r--drivers/pinctrl/qcom/pinctrl-spmi-mpp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
index 98f6f40274ba..d6ddc47b57ec 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;