From: Mike Frysinger Date: Tue, 28 Oct 2008 07:42:13 +0000 (+0800) Subject: Blackfin arch: fix incorrect limit check for bf54x check_gpio X-Git-Tag: v2.6.28-rc6~56^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=72edff8dd45fdee6e1a2bc431baefd8a5372f7cb;p=linux-2.6-omap-h63xx.git Blackfin arch: fix incorrect limit check for bf54x check_gpio 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 6e08f425bb4..5c0800adb4d 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -218,7 +218,7 @@ inline int check_gpio(unsigned gpio) if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 || gpio == GPIO_PH14 || gpio == GPIO_PH15 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15 - || gpio > MAX_BLACKFIN_GPIOS) + || gpio >= MAX_BLACKFIN_GPIOS) return -EINVAL; return 0; }