From: Dan Carpenter Date: Fri, 26 Oct 2012 06:59:43 +0000 (+0300) Subject: gpiolib: unlock on error in gpio_export() X-Git-Tag: next-20121029~17^2^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=529f2ad5e374f61987a8312603963c61d75a890a;p=karo-tx-linux.git gpiolib: unlock on error in gpio_export() We need to unlock here before returning. Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij --- 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)