From: Gabor Juhos Date: Mon, 7 Apr 2008 14:10:37 +0000 (+0000) Subject: fix a bug in the GPIO code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bb5cd9c240e1bb9d9e5d285e415186434228b959;p=openwrt%2Fstaging%2Faparcar.git fix a bug in the GPIO code SVN-Revision: 10759 --- diff --git a/target/linux/adm5120/files/arch/mips/adm5120/gpio.c b/target/linux/adm5120/files/arch/mips/adm5120/gpio.c index bf252670d4..02fd01bcbc 100644 --- a/target/linux/adm5120/files/arch/mips/adm5120/gpio.c +++ b/target/linux/adm5120/files/arch/mips/adm5120/gpio.c @@ -70,10 +70,10 @@ static u32 gpio_conf2; static inline int gpio_is_invalid(unsigned gpio) { if ((gpio > ADM5120_GPIO_MAX) || - (adm5120_gpio_map[gpio].flags & GPIO_FLAG_VALID) == 0); - return 0; + (adm5120_gpio_map[gpio].flags & GPIO_FLAG_VALID) == 0) + return 1; - return 1; + return 0; } static inline int gpio_is_used(unsigned gpio)