Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1351283 > unrolled thread

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

Started byLinus Walleij <linus.walleij@linaro.org>
First post2016-03-07 04:30 +0100
Last post2016-03-07 04:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] pinctrl: lpc18xx: ensure ngroups is initialized at  correct place Linus Walleij <linus.walleij@linaro.org> - 2016-03-07 04:30 +0100

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

FromLinus Walleij <linus.walleij@linaro.org>
Date2016-03-07 04:30 +0100
SubjectRe: [PATCH] pinctrl: lpc18xx: ensure ngroups is initialized at correct place
Message-ID<r9U1Q-5KX-11@gated-at.bofh.it>
On Thu, Feb 25, 2016 at 12:32 AM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@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@canonical.com>

Patch applied with Joachim's review tag.

Yours,
Linus Walleij

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web