summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-01-04 08:08:51 +0100
committerIngo Molnar <mingo@elte.hu>2011-01-04 08:08:54 +0100
commitcc2221969906a166a638aecdbae84a3d0462719e (patch)
tree2483f726e226c309207e1d0250660eea6e1787b8 /drivers/gpio/gpiolib.c
parent56f4c400349157289b474a3fd49ee96acab0a4d7 (diff)
parent387c31c7e5c9805b0aef8833d1731a5fe7bdea14 (diff)
downloadlinux-3.10-cc2221969906a166a638aecdbae84a3d0462719e.tar.gz
linux-3.10-cc2221969906a166a638aecdbae84a3d0462719e.tar.bz2
linux-3.10-cc2221969906a166a638aecdbae84a3d0462719e.zip
Merge commit 'v2.6.37-rc8' into perf/core
Merge reason: pick up latest -rc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 21da9c19a0c..649550e2cae 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1281,6 +1281,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
err = gpio_direction_output(gpio,
(flags & GPIOF_INIT_HIGH) ? 1 : 0);
+ if (err)
+ gpio_free(gpio);
+
return err;
}
EXPORT_SYMBOL_GPL(gpio_request_one);