Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1
authorMichael Hennerich <michael.hennerich@analog.com>
Mon, 11 Jun 2007 08:37:57 +0000 (16:37 +0800)
committerBryan Wu <bryan.wu@analog.com>
Mon, 11 Jun 2007 08:37:57 +0000 (16:37 +0800)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/kernel/bfin_gpio.c

index 3f49fae1cb1f686802a02055e1da2be85b03a4ff..8cefed8cf5d9d771d470674b48ed77132db1f2e5 100644 (file)
@@ -138,7 +138,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
 
 inline int check_gpio(unsigned short gpio)
 {
-       if (gpio > MAX_BLACKFIN_GPIOS)
+       if (gpio >= MAX_BLACKFIN_GPIOS)
                return -EINVAL;
        return 0;
 }