diff options
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 70de72c443e4..22edc4273ef6 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -1105,7 +1105,7 @@ int gpio_get_value_cansleep(unsigned gpio) | |||
1105 | 1105 | ||
1106 | might_sleep_if(extra_checks); | 1106 | might_sleep_if(extra_checks); |
1107 | chip = gpio_to_chip(gpio); | 1107 | chip = gpio_to_chip(gpio); |
1108 | return chip->get(chip, gpio - chip->base); | 1108 | return chip->get ? chip->get(chip, gpio - chip->base) : 0; |
1109 | } | 1109 | } |
1110 | EXPORT_SYMBOL_GPL(gpio_get_value_cansleep); | 1110 | EXPORT_SYMBOL_GPL(gpio_get_value_cansleep); |
1111 | 1111 | ||