diff options
Diffstat (limited to 'drivers/mfd/tps65010.c')
-rw-r--r-- | drivers/mfd/tps65010.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index 448f0a182dc4..677a127619d4 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c @@ -499,11 +499,11 @@ static int tps65010_gpio_get(struct gpio_chip *chip, unsigned offset) if (offset < 4) { value = i2c_smbus_read_byte_data(tps->client, TPS_DEFGPIO); if (value < 0) - return 0; + return value; if (value & (1 << (offset + 4))) /* output */ return !(value & (1 << offset)); else /* input */ - return (value & (1 << offset)); + return !!(value & (1 << offset)); } /* REVISIT we *could* report LED1/nPG and LED2 state ... */ |