aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 3f49fae1cb1f..8cefed8cf5d9 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -138,7 +138,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
138 138
139inline int check_gpio(unsigned short gpio) 139inline int check_gpio(unsigned short gpio)
140{ 140{
141 if (gpio > MAX_BLACKFIN_GPIOS) 141 if (gpio >= MAX_BLACKFIN_GPIOS)
142 return -EINVAL; 142 return -EINVAL;
143 return 0; 143 return 0;
144} 144}