Skip to content

Commit

Permalink
gpiolib: add missing braces in gpio_direction_show
Browse files Browse the repository at this point in the history
Add missing braces in an if..else condition.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Alexandre Courbot authored and Linus Walleij committed Feb 4, 2013
1 parent 1107ca1 commit 476171c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,14 @@ static ssize_t gpio_direction_show(struct device *dev,

mutex_lock(&sysfs_lock);

if (!test_bit(FLAG_EXPORT, &desc->flags))
if (!test_bit(FLAG_EXPORT, &desc->flags)) {
status = -EIO;
else
} else {
gpio_get_direction(gpio);
status = sprintf(buf, "%s\n",
test_bit(FLAG_IS_OUT, &desc->flags)
? "out" : "in");
}

mutex_unlock(&sysfs_lock);
return status;
Expand Down

0 comments on commit 476171c

Please sign in to comment.