projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c8aab8
)
gpio: fix memory leak in error path
author
Michal Nazarewicz
<mina86@mina86.com>
Wed, 13 Nov 2013 20:20:39 +0000
(21:20 +0100)
committer
Linus Walleij
<linus.walleij@linaro.org>
Mon, 25 Nov 2013 08:03:13 +0000
(09:03 +0100)
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpiolib.c
b/drivers/gpio/gpiolib.c
index 490198365ce47810ae75c558cb753acb8cc2a7e8..14ab16fbaad5583f4f2a86ee8743ce485da9f678 100644
(file)
--- a/
drivers/gpio/gpiolib.c
+++ b/
drivers/gpio/gpiolib.c
@@
-1354,8
+1354,10
@@
int gpiochip_add_pingroup_range(struct gpio_chip *chip,
ret = pinctrl_get_group_pins(pctldev, pin_group,
&pin_range->range.pins,
&pin_range->range.npins);
- if (ret < 0)
+ if (ret < 0) {
+ kfree(pin_range);
return ret;
+ }
pinctrl_add_gpio_range(pctldev, &pin_range->range);