diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c index 26e7edb74f420909f1effc2190f7c1f48954bbdf..7667e77dd52eac2ba7effa53bbeafdcd16337e4d 100644 --- a/drivers/gpio/gpio-viperboard.c +++ b/drivers/gpio/gpio-viperboard.c @@ -95,7 +95,7 @@ static int vprbrd_gpioa_get(struct gpio_chip *chip, /* if io is set to output, just return the saved value */ if (gpio->gpioa_out & (1 << offset)) - return gpio->gpioa_val & (1 << offset); + return !!(gpio->gpioa_val & (1 << offset)); mutex_lock(&vb->lock);