Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: s3c24xx: off by one in s3c24xx_eint_init()

If "irq == NUM_EINT" then it writes one space beyond the end of the
eint_data->domains[] array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Dan Carpenter and committed by
Linus Walleij
774e2d98 ddb6c45f

+1 -1
+1 -1
drivers/pinctrl/pinctrl-s3c24xx.c
··· 549 549 irq = bank->eint_offset; 550 550 mask = bank->eint_mask; 551 551 for (pin = 0; mask; ++pin, mask >>= 1) { 552 - if (irq > NUM_EINT) 552 + if (irq >= NUM_EINT) 553 553 break; 554 554 if (!(mask & 1)) 555 555 continue;