Commit e4dcec4e authored by YueHaibing's avatar YueHaibing Committed by Kleber Sacilotto de Souza

pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux

BugLink: https://bugs.launchpad.net/bugs/1810947

[ Upstream commit 69f8455f ]

'ret' should be returned while pmic_mpp_write_mode_ctl fails.

Fixes: 0e948042 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 2a74b6fd
...@@ -321,6 +321,8 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function, ...@@ -321,6 +321,8 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function,
pad->function = function; pad->function = function;
ret = pmic_mpp_write_mode_ctl(state, pad); ret = pmic_mpp_write_mode_ctl(state, pad);
if (ret < 0)
return ret;
val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT; val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment