diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-02-24 18:32:50 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-03-07 04:28:05 +0100 |
commit | 5e9a207547079a23c3d4ecb4bad050ba8acc3f59 (patch) | |
tree | 5863e547ca63d319385f351b0c5d134d85f05826 /drivers/pinctrl/core.h | |
parent | Merge branch 'sh-pfc-for-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-5e9a207547079a23c3d4ecb4bad050ba8acc3f59.tar.xz linux-5e9a207547079a23c3d4ecb4bad050ba8acc3f59.zip |
pinctrl: lpc18xx: ensure ngroups is initialized at correct place
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>
Reviewed-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/core.h')
0 files changed, 0 insertions, 0 deletions