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

Linus Walleij linus.walleij at linaro.org
Sun Mar 6 19:28:56 PST 2016


On Thu, Feb 25, 2016 at 12:32 AM, Colin King <colin.king at canonical.com> wrote:

> From: Colin Ian King <colin.king at canonical.com>
>
> 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 the inner loop before the first
> inner loop iteration.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>

Patch applied with Joachim's review tag.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list