diff options
Diffstat (limited to 'drivers/gpio/gpio-max732x.c')
-rw-r--r-- | drivers/gpio/gpio-max732x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c index a1094984b666..880ce94e6077 100644 --- a/drivers/gpio/gpio-max732x.c +++ b/drivers/gpio/gpio-max732x.c @@ -207,9 +207,9 @@ static int max732x_gpio_get_value(struct gpio_chip *gc, unsigned off) ret = max732x_readb(chip, is_group_a(chip, off), ®_val); if (ret < 0) - return 0; + return ret; - return reg_val & (1u << (off & 0x7)); + return !!(reg_val & (1u << (off & 0x7))); } static void max732x_gpio_set_mask(struct gpio_chip *gc, unsigned off, int mask, |