linux/drivers/staging/mt7621-pinctrl
Colin Ian King cd56a51413 staging: mt7621-pinctrl: fix uninitialized variable ngroups
Currently the for_each_node_with_property loop us incrementing variable
ngroups however it was not initialized and hence will contain garbage.
Fix this by initializing ngroups to zero.

Detected with static analysis with cppcheck:

drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c:89]: (error) Uninitialized
variable: ngroups

Fixes: e12a1a6e08 ("staging: mt7621-pinctrl: refactor rt2880_pinctrl_dt_node_to_map function")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11 11:47:38 -08:00
..
Kconfig
Makefile
pinctrl-rt2880.c staging: mt7621-pinctrl: fix uninitialized variable ngroups 2018-11-11 11:47:38 -08:00
TODO