mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 02:02:28 +09:00
gpio: fix error path in lineevent_create
commitf001cc351aupstream. If gpiod_request() fails the cleanup must not call gpiod_free(). Cc: stable@vger.kernel.org Fixes:61f922db72("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
28534d2947
commit
a7ea57b025
@@ -813,7 +813,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user