diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/ti/am335x/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/ti/am335x/gpio.c b/src/cpu/ti/am335x/gpio.c index d4f7edfb72..bfbbbd2698 100644 --- a/src/cpu/ti/am335x/gpio.c +++ b/src/cpu/ti/am335x/gpio.c @@ -22,7 +22,7 @@ static struct am335x_gpio_regs *gpio_regs_and_bit(unsigned gpio, uint32_t *bit) { unsigned bank = gpio / AM335X_GPIO_BITS_PER_BANK; - if (bank > ARRAY_SIZE(am335x_gpio_banks)) { + if (bank >= ARRAY_SIZE(am335x_gpio_banks)) { printk(BIOS_ERR, "Bad gpio index %d.\n", gpio); return NULL; } |