summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-cdev.c
diff options
context:
space:
mode:
authorKent Gibson <warthog618@gmail.com>2020-07-08 06:15:50 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-07-12 10:22:00 +0200
commit0cdc85a371c7c612a6fd04dd486a60f58350505b (patch)
tree6ce4737f3ac6f85bf8e7bdc23d3b0c8beb89747b /drivers/gpio/gpiolib-cdev.c
parentgpiolib: cdev: rename numdescs to num_descs (diff)
downloadlinux-0cdc85a371c7c612a6fd04dd486a60f58350505b.tar.xz
linux-0cdc85a371c7c612a6fd04dd486a60f58350505b.zip
gpiolib: cdev: remove pointless decrement of i
Remove pointless decrement of variable, and associated comment. While i is used subsequently, it is re-initialized so this decrement serves no purpose. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.c')
-rw-r--r--drivers/gpio/gpiolib-cdev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index b39e7ef8c0d4..d50339ef6f05 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -331,8 +331,6 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
dev_dbg(&gdev->dev, "registered chardev handle for line %d\n",
offset);
}
- /* Let i point at the last handle */
- i--;
lh->num_descs = handlereq.lines;
fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);