diff options
author | Karina Yankevich <k.yankevich@omp.ru> | 2023-09-22 15:59:25 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-09-27 10:39:29 +0200 |
commit | 3d855c3f2e1373f40962ea4ab7b97c6a563b52bc (patch) | |
tree | a3cfb3e8c298993d40bb09a1efab95e9e5bf1700 /drivers/pinctrl/mediatek | |
parent | dt-bindings: pinctrl: Add missing additionalProperties on child node schemas (diff) | |
download | linux-3d855c3f2e1373f40962ea4ab7b97c6a563b52bc.tar.xz linux-3d855c3f2e1373f40962ea4ab7b97c6a563b52bc.zip |
pinctrl: mediatek: paris: handle mtk_hw_set_value() errors in mtk_pmx_set_mux()
mtk_pmx_set_mux() doesn't check the result of mtk_hw_set_value()
despite it may return negative error code. Propagate error code
to caller functions.
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Signed-off-by: Karina Yankevich <k.yankevich@omp.ru>
Link: https://lore.kernel.org/r/20230922135926.3653428-1-k.yankevich@omp.ru
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek')
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-paris.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index 33d6c3fb7908..b7cb5a1f1060 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -779,9 +779,7 @@ static int mtk_pmx_set_mux(struct pinctrl_dev *pctldev, return -EINVAL; desc = (const struct mtk_pin_desc *)&hw->soc->pins[grp->pin]; - mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_MODE, desc_func->muxval); - - return 0; + return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_MODE, desc_func->muxval); } static const struct pinmux_ops mtk_pmxops = { |