diff options
| author | Russell King <[email protected]> | 2010-07-29 15:48:02 +0100 |
|---|---|---|
| committer | Russell King <[email protected]> | 2010-07-29 15:48:02 +0100 |
| commit | 129961ecaf21c9ee899ad9067d917c1aa172fb7a (patch) | |
| tree | 49eafdcf4d6ac490ecdd92c36c285817872eaf34 /drivers/gpio/gpiolib.c | |
| parent | 392c57a2ec811db37ae45adc513704cf92ba3e69 (diff) | |
| parent | cccf59abea4e1c36322e365d6e61ff7de1f3ee07 (diff) | |
Merge branch 'wells/lpc32xx-arch_v2' of git://git.lpclinux.com/linux-2.6-lpc into devel-stable
Diffstat (limited to 'drivers/gpio/gpiolib.c')
| -rw-r--r-- | drivers/gpio/gpiolib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 3ca36542e338..4e51fe3c1fc4 100644 --- a/drivers/gpio/gpiolib.c +++ b/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; } |