]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
leds: max5970: Remove unused variable
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 14 Dec 2023 18:40:08 +0000 (20:40 +0200)
committerLee Jones <lee@kernel.org>
Thu, 21 Dec 2023 14:42:59 +0000 (14:42 +0000)
leds-max5970.c:50:21: warning: variable 'num_leds' set but not used [-Wunused-but-set-variable]

Remove unused variable.

Fixes: 736214b4b02a ("leds: max5970: Add support for max5970")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231214184050.1272848-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-max5970.c

index 456a16a47450e922b7198285042cb0c4687e7201..7959d079ae942259d412b63827eab67427438990 100644 (file)
@@ -45,7 +45,7 @@ static int max5970_led_probe(struct platform_device *pdev)
        struct regmap *regmap;
        struct device_node *led_node, *child;
        struct max5970_led *ddata;
-       int ret = -ENODEV, num_leds = 0;
+       int ret = -ENODEV;
 
        regmap = dev_get_regmap(pdev->dev.parent, NULL);
        if (!regmap)
@@ -89,7 +89,6 @@ static int max5970_led_probe(struct platform_device *pdev)
                        dev_err(dev, "Failed to initialize LED %u\n", reg);
                        return ret;
                }
-               num_leds++;
        }
 
        return ret;