Browse Source

fix a bug in the GPIO code

SVN-Revision: 10759
Gabor Juhos 18 years ago
parent
commit
bb5cd9c240
1 changed files with 3 additions and 3 deletions
  1. 3 3
      target/linux/adm5120/files/arch/mips/adm5120/gpio.c

+ 3 - 3
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)