Commit 774e2d98 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent ddb6c45f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment