[bug report] pinctrl: mediatek: add pinctrl driver for MT7622 SoC
Sean Wang
sean.wang at mediatek.com
Tue Jan 9 06:13:46 PST 2018
On Tue, 2018-01-09 at 12:55 +0300, Dan Carpenter wrote:
> Hello Sean Wang,
>
> The patch d6ed93551320: "pinctrl: mediatek: add pinctrl driver for
> MT7622 SoC" from Dec 12, 2017, leads to the following static checker
> warning:
>
> drivers/pinctrl/mediatek/pinctrl-mt7622.c:1419 mtk_gpio_get()
> error: uninitialized symbol 'value'.
>
> drivers/pinctrl/mediatek/pinctrl-mt7622.c
> 1412 static int mtk_gpio_get(struct gpio_chip *chip, unsigned int gpio)
> 1413 {
> 1414 struct mtk_pinctrl *hw = dev_get_drvdata(chip->parent);
> 1415 int value;
> 1416
> 1417 mtk_hw_get_value(hw, gpio, PINCTRL_PIN_REG_DI, &value);
> ^^^^^^^^^^^^^^^^
> No error handling.
>
Nice catch, Will fix it soon.
Sean
> 1418
> 1419 return !!value;
> 1420 }
>
> regards,
> dan carpenter
>
More information about the Linux-mediatek
mailing list