提交 529f2ad5 编写于 作者: D Dan Carpenter 提交者: Linus Walleij

gpiolib: unlock on error in gpio_export()

We need to unlock here before returning.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 80b0a602
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册