ramips: sanitize return value of ramips_gpio_get

SVN-Revision: 19401
lede-17.01
Gabor Juhos 2010-01-30 15:25:08 +00:00
parent af9f40e60d
commit e2dde81ead
1 changed files with 1 additions and 1 deletions

View File

@ -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 = {