From: Michael Hennerich Date: Mon, 11 Jun 2007 08:37:57 +0000 (+0800) Subject: Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1 X-Git-Tag: firefly_0821_release~28694^2~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e7613aab91270a6c76c61d3a1c05eaaa882b1842;p=firefly-linux-kernel-4.4.55.git Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1 Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- 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 inline int check_gpio(unsigned short gpio) { - if (gpio > MAX_BLACKFIN_GPIOS) + if (gpio >= MAX_BLACKFIN_GPIOS) return -EINVAL; return 0; }