aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-lpc32xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-lpc32xx.c')
-rw-r--r--drivers/gpio/gpio-lpc32xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c
index 36d7dee07b28..dda6a756a3d9 100644
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -533,7 +533,7 @@ static int lpc32xx_of_xlate(struct gpio_chip *gc,
533{ 533{
534 /* Is this the correct bank? */ 534 /* Is this the correct bank? */
535 u32 bank = gpiospec->args[0]; 535 u32 bank = gpiospec->args[0];
536 if ((bank > ARRAY_SIZE(lpc32xx_gpiochip) || 536 if ((bank >= ARRAY_SIZE(lpc32xx_gpiochip) ||
537 (gc != &lpc32xx_gpiochip[bank].chip))) 537 (gc != &lpc32xx_gpiochip[bank].chip)))
538 return -EINVAL; 538 return -EINVAL;
539 539