From d01f8779b1b4191b9aa8a221e6b34919877c67f2 Mon Sep 17 00:00:00 2001 From: Jon Povey Date: Tue, 27 Jul 2010 13:18:06 -0700 Subject: [PATCH] --- yaml --- r: 201331 b: refs/heads/master c: 6a99ad4a2e1b1693ffe8e40cc0dddfc633ce2a50 h: refs/heads/master i: 201329: 7b4c86b3b1fc64a242458ce05932e14c4b7d41d9 201327: 1ccd7d5726a0f5c913dcd8c463b86f232661e462 v: v3 --- [refs] | 2 +- trunk/drivers/gpio/gpiolib.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 3f07c9b516e3..94b24b6d850f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 952e1c6632ab5060a2323624d2908f31d62fc0a3 +refs/heads/master: 6a99ad4a2e1b1693ffe8e40cc0dddfc633ce2a50 diff --git a/trunk/drivers/gpio/gpiolib.c b/trunk/drivers/gpio/gpiolib.c index 3ca36542e338..4e51fe3c1fc4 100644 --- a/trunk/drivers/gpio/gpiolib.c +++ b/trunk/drivers/gpio/gpiolib.c @@ -893,10 +893,12 @@ EXPORT_SYMBOL_GPL(gpio_sysfs_set_active_low); void gpio_unexport(unsigned gpio) { struct gpio_desc *desc; - int status = -EINVAL; + int status = 0; - if (!gpio_is_valid(gpio)) + if (!gpio_is_valid(gpio)) { + status = -EINVAL; goto done; + } mutex_lock(&sysfs_lock); @@ -911,7 +913,6 @@ void gpio_unexport(unsigned gpio) clear_bit(FLAG_EXPORT, &desc->flags); put_device(dev); device_unregister(dev); - status = 0; } else status = -ENODEV; }