linux_dsm_epyc7002/drivers/pinctrl/mediatek
Sean Wang 181cdac02c pinctrl: mediatek: mt7622: fix potential uninitialized value being returned
commit d6ed935513 ("pinctrl: mediatek: add pinctrl driver for MT7622
SoC") leads to the following static checker warning:

drivers/pinctrl/mediatek/pinctrl-mt7622.c:1419 mtk_gpio_get()
error: uninitialized symbol 'value'.
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);
^^^^^^^^^^^^^^^^
1418
1419          return !!value;
1420  }

The appropriate error handling must be added to avoid the potential error
caused by uninitialized value being returned.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-01-11 10:42:12 +01:00
..
Kconfig pinctrl: mediatek: add pinctrl driver for MT7622 SoC 2017-12-20 08:49:41 +01:00
Makefile pinctrl: mediatek: add pinctrl driver for MT7622 SoC 2017-12-20 08:49:41 +01:00
pinctrl-mt2701.c pinctrl: mediatek: reuse pinctrl driver for mt7623 2017-05-22 10:39:25 +02:00
pinctrl-mt6397.c pinctrl: mediatek: use builtin_platform_driver 2016-11-22 10:17:28 +01:00
pinctrl-mt7622.c pinctrl: mediatek: mt7622: fix potential uninitialized value being returned 2018-01-11 10:42:12 +01:00
pinctrl-mt8127.c pinctrl: mediatek: mt8* make driver explicitly non-modular 2016-01-27 14:59:31 +01:00
pinctrl-mt8135.c pinctrl: mediatek: mt8* make driver explicitly non-modular 2016-01-27 14:59:31 +01:00
pinctrl-mt8173.c pinctrl: mediatek: mt8* make driver explicitly non-modular 2016-01-27 14:59:31 +01:00
pinctrl-mtk-common.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
pinctrl-mtk-common.h pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for mt2701 2016-01-28 11:12:03 +01:00
pinctrl-mtk-mt2701.h pinctrl: mediatek: update PCIe mux data for MT7623 2017-08-31 09:13:03 +02:00
pinctrl-mtk-mt6397.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl-mtk-mt8127.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl-mtk-mt8135.h pinctrl: mediatek: Fix include directive 2015-03-18 10:58:21 +01:00
pinctrl-mtk-mt8173.h pinctrl: mt8173: set GPIO16 to usb iddig mode 2016-12-07 15:27:01 +01:00