Commit 529f2ad5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

gpiolib: unlock on error in gpio_export()

We need to unlock here before returning.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 80b0a602
...@@ -756,7 +756,8 @@ int gpio_export(unsigned gpio, bool direction_may_change) ...@@ -756,7 +756,8 @@ int gpio_export(unsigned gpio, bool direction_may_change)
__func__, gpio, __func__, gpio,
test_bit(FLAG_REQUESTED, &desc->flags), test_bit(FLAG_REQUESTED, &desc->flags),
test_bit(FLAG_EXPORT, &desc->flags)); test_bit(FLAG_EXPORT, &desc->flags));
return -EPERM; status = -EPERM;
goto fail_unlock;
} }
if (!desc->chip->direction_input || !desc->chip->direction_output) if (!desc->chip->direction_input || !desc->chip->direction_output)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment