gpiolib: unlock on error in gpio_export()
Subsystems (2)
PATCH 1/1 gpiolib: unlock on error in gpio_export()
We need to unlock here before returning.
Signed-off-by Dan Carpenter <[email protected]>
---
Only needed in linux-next.
drivers/gpio/gpiolib.c +2 -1
@@ -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)
Quoted 5 lines · Dan Carpenter
We need to unlock here before returning.
Signed-off-by Dan Carpenter <[email protected]>---
Only needed in linux-next.
Thanks Dan, applied to my devel branch.
Yours,
Linus Walleij