leds: lp55xx: remove variable j
authorColin Ian King <colin.i.king@gmail.com>
Thu, 20 Oct 2022 21:07:31 +0000 (22:07 +0100)
committerPavel Machek <pavel@ucw.cz>
Fri, 21 Oct 2022 13:12:06 +0000 (15:12 +0200)
The variable j being incremented but it is never referenced,
it is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-lp55xx-common.c

index 9fdfc1b9a1a0cb3e4106a2d89abe3d02b2a8815e..ca2e28fb843f17e3e72b3ed767d22d580ddb1e69 100644 (file)
@@ -166,7 +166,7 @@ static int lp55xx_init_led(struct lp55xx_led *led,
        struct mc_subled *mc_led_info;
        struct led_classdev *led_cdev;
        char name[32];
-       int i, j = 0;
+       int i;
        int ret;
 
        if (chan >= max_channel) {
@@ -201,7 +201,6 @@ static int lp55xx_init_led(struct lp55xx_led *led,
                                pdata->led_config[chan].color_id[i];
                        mc_led_info[i].channel =
                                        pdata->led_config[chan].output_num[i];
-                       j++;
                }
 
                led->mc_cdev.subled_info = mc_led_info;