patch "staging: mt7621-pinctrl: fix uninitialized variable ngroups" added to staging-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
staging: mt7621-pinctrl: fix uninitialized variable ngroups
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
cd56a5141331abfe218d744a3d66e1788135d482Mon Sep 17 00:00:00 2001
From: Colin Ian King <[email protected]>
Date: Sat, 10 Nov 2018 23:28:06 +0000
Subject: 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
--- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +1 -1
@@ -82,7 +82,7 @@ static int rt2880_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrldev,struct property *prop;const char *function_name, *group_name;int ret; -int ngroups; +int ngroups =0 ;unsigned int reserved_maps =0 ;for_each_node_with_property (np_config,"group" )
Signature · 1 line
2.19.1