projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'linus' into x86/apic-cleanups
[cascardo/linux.git]
/
drivers
/
gpio
/
gpiolib.c
diff --git
a/drivers/gpio/gpiolib.c
b/drivers/gpio/gpiolib.c
index
21da9c1
..
649550e
100644
(file)
--- 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);