Skip to content

Commit 3830711

Browse files
committed
Merge tag 'gpio-v4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Linus writes: "A single GPIO fix: Free the last used descriptor, an off by one error. This is tagged for stable as well." * tag 'gpio-v4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpiolib: Free the last requested descriptor
2 parents 5aebc7d + 19a4fbf commit 3830711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
571571
if (ret)
572572
goto out_free_descs;
573573
lh->descs[i] = desc;
574-
count = i;
574+
count = i + 1;
575575

576576
if (lflags & GPIOHANDLE_REQUEST_ACTIVE_LOW)
577577
set_bit(FLAG_ACTIVE_LOW, &desc->flags);

0 commit comments

Comments
 (0)