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

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;