projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab3dbcf
)
gpio: fix error path in lineevent_create
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Mon, 16 Apr 2018 11:17:53 +0000
(13:17 +0200)
committer
Linus Walleij
<linus.walleij@linaro.org>
Thu, 26 Apr 2018 22:43:03 +0000
(
00:43
+0200)
If gpiod_request() fails the cleanup must not call gpiod_free().
Cc: stable@vger.kernel.org
Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
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 d07771797707b5c2bd7fa6daef0c551999fec97b..d8ccb500872fa2eacd26a91c473ee02a131cea18 100644
(file)
--- a/
drivers/gpio/gpiolib.c
+++ b/
drivers/gpio/gpiolib.c
@@
-903,7
+903,7
@@
static int lineevent_create(struct gpio_device *gdev, void __user *ip)
desc = &gdev->descs[offset];
ret = gpiod_request(desc, le->label);
if (ret)
- goto out_free_
desc
;
+ goto out_free_
label
;
le->desc = desc;
le->eflags = eflags;