Commit 476171ce authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Linus Walleij

gpiolib: add missing braces in gpio_direction_show

Add missing braces in an if..else condition.
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1107ca10
...@@ -212,13 +212,14 @@ static ssize_t gpio_direction_show(struct device *dev, ...@@ -212,13 +212,14 @@ static ssize_t gpio_direction_show(struct device *dev,
mutex_lock(&sysfs_lock); mutex_lock(&sysfs_lock);
if (!test_bit(FLAG_EXPORT, &desc->flags)) if (!test_bit(FLAG_EXPORT, &desc->flags)) {
status = -EIO; status = -EIO;
else } else {
gpio_get_direction(gpio); gpio_get_direction(gpio);
status = sprintf(buf, "%s\n", status = sprintf(buf, "%s\n",
test_bit(FLAG_IS_OUT, &desc->flags) test_bit(FLAG_IS_OUT, &desc->flags)
? "out" : "in"); ? "out" : "in");
}
mutex_unlock(&sysfs_lock); mutex_unlock(&sysfs_lock);
return status; return status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment