]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpio/gpio-lpc32xx.c
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux
[karo-tx-linux.git] / drivers / gpio / gpio-lpc32xx.c
index 36d7dee07b28c9b1e66df8edf6699168fdf0a00f..dda6a756a3d9946b6d51693a9e09fe48c3cd4ac9 100644 (file)
@@ -533,7 +533,7 @@ static int lpc32xx_of_xlate(struct gpio_chip *gc,
 {
        /* Is this the correct bank? */
        u32 bank = gpiospec->args[0];
-       if ((bank > ARRAY_SIZE(lpc32xx_gpiochip) ||
+       if ((bank >= ARRAY_SIZE(lpc32xx_gpiochip) ||
            (gc != &lpc32xx_gpiochip[bank].chip)))
                return -EINVAL;