Skip to contentSkip to conversation

gpiolib: add missing braces in gpio_direction_show

PATCH Applied Alexandre Courbot 2 participants 2 messages Feb 4, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: add missing braces in gpio_direction_show

Add missing braces in an if..else condition.

---
 drivers/gpio/gpiolib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpio/gpiolib.c +3 -2
index e27877a..e14eb88 100644
@@ -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;
Signature · 1 line
1.8.1.2