linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpiolib: add missing braces in gpio_direction_show
@ 2013-02-04  8:42 Alexandre Courbot
  2013-02-04 20:47 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Courbot @ 2013-02-04  8:42 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely; +Cc: linux-kernel, Alexandre Courbot

Add missing braces in an if..else condition.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drivers/gpio/gpiolib.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index e27877a..e14eb88 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpiolib: add missing braces in gpio_direction_show
  2013-02-04  8:42 [PATCH] gpiolib: add missing braces in gpio_direction_show Alexandre Courbot
@ 2013-02-04 20:47 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2013-02-04 20:47 UTC (permalink / raw)
  To: Alexandre Courbot; +Cc: Grant Likely, linux-kernel

On Mon, Feb 4, 2013 at 9:42 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:

> Add missing braces in an if..else condition.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

Applied, thanks!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-04 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-04  8:42 [PATCH] gpiolib: add missing braces in gpio_direction_show Alexandre Courbot
2013-02-04 20:47 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).