diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-26 08:59:43 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-10-26 09:35:17 +0200 |
commit | 529f2ad5e374f61987a8312603963c61d75a890a (patch) | |
tree | d779beedcbd3895a77526792351d3ce8eb67e7c0 | |
parent | gpiolib: add gpio get direction callback support (diff) | |
download | linux-529f2ad5e374f61987a8312603963c61d75a890a.tar.xz linux-529f2ad5e374f61987a8312603963c61d75a890a.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/gpio/gpiolib.c | 3 |
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) |