Skip to content

Commit d3578b4

Browse files
andy-shevlag-linaro
authored andcommitted
leds: max5970: Remove unused variable
leds-max5970.c:50:21: warning: variable 'num_leds' set but not used [-Wunused-but-set-variable] Remove unused variable. Fixes: 736214b ("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>
1 parent 5e72f1f commit d3578b4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/leds/leds-max5970.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static int max5970_led_probe(struct platform_device *pdev)
4545
struct regmap *regmap;
4646
struct device_node *led_node, *child;
4747
struct max5970_led *ddata;
48-
int ret = -ENODEV, num_leds = 0;
48+
int ret = -ENODEV;
4949

5050
regmap = dev_get_regmap(pdev->dev.parent, NULL);
5151
if (!regmap)
@@ -89,7 +89,6 @@ static int max5970_led_probe(struct platform_device *pdev)
8989
dev_err(dev, "Failed to initialize LED %u\n", reg);
9090
return ret;
9191
}
92-
num_leds++;
9392
}
9493

9594
return ret;

0 commit comments

Comments
 (0)