Archived
14
0
Fork 0

gpiolib: unlock on error in gpio_export()

We need to unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Dan Carpenter 2012-10-26 09:59:43 +03:00 committed by Linus Walleij
parent 80b0a60292
commit 529f2ad5e3

View file

@ -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)