pinctrl: mvebu: prevent walking off the end of group array
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 16 Mar 2013 11:44:32 +0000 (12:44 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 27 Mar 2013 22:36:17 +0000 (23:36 +0100)
commitaaed651ff619993fb2101a22b32dd0664e54921b
tree43d78fe1b6f8eb754005153bcc8d694198789ffc
parent50cf7c8ab324de348990bb028ad9ed10872d527a
pinctrl: mvebu: prevent walking off the end of group array

While investigating (ab)use of krealloc, David found this bug.  It's
unlikely to occur, but now we detect the condition and error out
appropriately.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-mvebu.c