1 From 9f9d17c228c89e38ed612500126daf626270be9a Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Sat, 27 Nov 2021 17:08:36 +0300
4 Subject: [PATCH] pinctrl: mediatek: add a check for error in
5 mtk_pinconf_bias_get_rsel()
7 All the other mtk_hw_get_value() calls have a check for "if (err)" so
8 we can add one here as well. This silences a Smatch warning:
10 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:819 mtk_pinconf_bias_get_rsel()
11 error: uninitialized symbol 'pd'.
13 Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature")
14 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
15 Link: https://lore.kernel.org/r/20211127140836.GB24002@kili
16 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
18 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 2 ++
19 1 file changed, 2 insertions(+)
21 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
22 +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
23 @@ -815,6 +815,8 @@ static int mtk_pinconf_bias_get_rsel(str
26 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_PD, &pd);
30 if (pu == 0 && pd == 0) {