1 |
From 8b4912198d86003d0e44a020448766f91329af4c Mon Sep 17 00:00:00 2001 |
2 |
From: YueHaibing <yuehaibing@huawei.com> |
3 |
Date: Thu, 20 Sep 2018 01:58:18 +0000 |
4 |
Subject: [PATCH 052/145] pinctrl: qcom: spmi-mpp: Fix err handling of |
5 |
pmic_mpp_set_mux |
6 |
|
7 |
[ Upstream commit 69f8455f6cc78fa6cdf80d0105d7a748106271dc ] |
8 |
|
9 |
'ret' should be returned while pmic_mpp_write_mode_ctl fails. |
10 |
|
11 |
Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") |
12 |
Signed-off-by: YueHaibing <yuehaibing@huawei.com> |
13 |
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> |
14 |
Signed-off-by: Sasha Levin <sashal@kernel.org> |
15 |
--- |
16 |
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 ++ |
17 |
1 file changed, 2 insertions(+) |
18 |
|
19 |
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c |
20 |
index 6556dbeae65e..418bc40df7ca 100644 |
21 |
--- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c |
22 |
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c |
23 |
@@ -319,6 +319,8 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function, |
24 |
pad->function = function; |
25 |
|
26 |
ret = pmic_mpp_write_mode_ctl(state, pad); |
27 |
+ if (ret < 0) |
28 |
+ return ret; |
29 |
|
30 |
val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT; |
31 |
|
32 |
-- |
33 |
2.19.1 |
34 |
|