Skip to content

Commit 63e2ae9

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
gpio: fix error path in lineevent_create
commit f001cc3 upstream. If gpiod_request() fails the cleanup must not call gpiod_free(). Cc: stable@vger.kernel.org Fixes: 61f922d ("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>
1 parent 2b0e672 commit 63e2ae9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
795795
desc = &gdev->descs[offset];
796796
ret = gpiod_request(desc, le->label);
797797
if (ret)
798-
goto out_free_desc;
798+
goto out_free_label;
799799
le->desc = desc;
800800
le->eflags = eflags;
801801

0 commit comments

Comments
 (0)