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>
This commit is contained in:
Dan Carpenter 2013-08-27 04:11:26 +03:00 committed by Linus Walleij
parent ddb6c45fb7
commit 774e2d981f

View file

@ -549,7 +549,7 @@ static int s3c24xx_eint_init(struct samsung_pinctrl_drv_data *d)
irq = bank->eint_offset;
mask = bank->eint_mask;
for (pin = 0; mask; ++pin, mask >>= 1) {
if (irq > NUM_EINT)
if (irq >= NUM_EINT)
break;
if (!(mask & 1))
continue;