From e2dde81ead5f2448344f39137a9a4f30fd7b841c Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Sat, 30 Jan 2010 15:25:08 +0000 Subject: ramips: sanitize return value of ramips_gpio_get SVN-Revision: 19401 --- target/linux/ramips/files/arch/mips/ralink/common/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/ramips') diff --git a/target/linux/ramips/files/arch/mips/ralink/common/gpio.c b/target/linux/ramips/files/arch/mips/ralink/common/gpio.c index 3a1b038..892f15b 100644 --- a/target/linux/ramips/files/arch/mips/ralink/common/gpio.c +++ b/target/linux/ramips/files/arch/mips/ralink/common/gpio.c @@ -131,7 +131,7 @@ static int ramips_gpio_get(struct gpio_chip *chip, unsigned offset) u32 t; t = ramips_gpio_rr(rg, RAMIPS_GPIO_REG_DATA); - return (t & (1 << offset)); + return !!(t & (1 << offset)); } static struct ramips_gpio_chip ramips_gpio_chip0 = { -- cgit v1.1