* [patch] gpiolib: unlock on error in gpio_export()
@ 2012-10-26 6:59 Dan Carpenter
2012-10-26 7:35 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-10-26 6:59 UTC (permalink / raw)
To: Grant Likely, Ryan Mallon; +Cc: Linus Walleij, linux-kernel, kernel-janitors
We need to unlock here before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Only needed in linux-next.
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index d5f9742..14251c3 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -728,7 +728,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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-26 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-26 6:59 [patch] gpiolib: unlock on error in gpio_export() Dan Carpenter
2012-10-26 7:35 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®