]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
pinctrl: s3c24xx: off by one in s3c24xx_eint_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 27 Aug 2013 01:11:26 +0000 (04:11 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 28 Aug 2013 12:44:25 +0000 (14:44 +0200)
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>
drivers/pinctrl/pinctrl-s3c24xx.c

index 24446daaad7dd2352393b8881a6584e8d6ec8c1c..ad3eaad1700157a21ad7c692242df37b03e0997e 100644 (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;