summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index e468eed261c5..fd2b71c70997 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -756,7 +756,8 @@ int gpio_export(unsigned gpio, bool direction_may_change)
__func__, gpio,
test_bit(FLAG_REQUESTED, &desc->flags),
test_bit(FLAG_EXPORT, &desc->flags));
- return -EPERM;
+ status = -EPERM;
+ goto fail_unlock;
}
if (!desc->chip->direction_input || !desc->chip->direction_output)
OpenPOWER on IntegriCloud