Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 529f2ad5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij
Browse files

gpiolib: unlock on error in gpio_export()



We need to unlock here before returning.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 80b0a602
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)