Re: [PATCH] pinctrl: lpc18xx: ensure ngroups is initialized at correct place

2016-03-06 Thread Linus Walleij
On Thu, Feb 25, 2016 at 12:32 AM, Colin King wrote: > From: Colin Ian King > > The initialization of ngroups is occurring at the end of the > first iteration of the outer loop, which means that the > assignment pins[ngroups++] = i is potentially indexing into > a region outside of array pins be

Re: [PATCH] pinctrl: lpc18xx: ensure ngroups is initialized at correct place

2016-02-25 Thread Joachim Eastwood
Hi Colin, On 24 February 2016 at 18:32, Colin King wrote: > From: Colin Ian King > > The initialization of ngroups is occurring at the end of the > first iteration of the outer loop, which means that the > assignment pins[ngroups++] = i is potentially indexing into > a region outside of array p

[PATCH] pinctrl: lpc18xx: ensure ngroups is initialized at correct place

2016-02-24 Thread Colin King
From: Colin Ian King The initialization of ngroups is occurring at the end of the first iteration of the outer loop, which means that the assignment pins[ngroups++] = i is potentially indexing into a region outside of array pins because ngroups is not initialized. Instead, initialize ngroups in