[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1537408698-196297-1-git-send-email-yuehaibing@huawei.com>
Date: Thu, 20 Sep 2018 01:58:18 +0000
From: YueHaibing <yuehaibing@...wei.com>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>
CC: YueHaibing <yuehaibing@...wei.com>,
<linux-arm-msm@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] 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@...wei.com>
---
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 98f6f40..d6ddc47 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;
Powered by blists - more mailing lists