diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-12-14 20:40:08 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-12-21 14:42:59 +0000 |
commit | d3578b4982e6ebccbd898806ac86b2db4b2bcc5e (patch) | |
tree | eaa6127eccabfc0c1991a49b8be5f3eea7dfbb60 /drivers/leds | |
parent | 5e72f1fe23839bd2093693a357a6fac8e5463483 (diff) | |
download | lwn-d3578b4982e6ebccbd898806ac86b2db4b2bcc5e.tar.gz lwn-d3578b4982e6ebccbd898806ac86b2db4b2bcc5e.zip |
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: 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>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-max5970.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/leds/leds-max5970.c b/drivers/leds/leds-max5970.c index 456a16a47450..7959d079ae94 100644 --- a/drivers/leds/leds-max5970.c +++ b/drivers/leds/leds-max5970.c @@ -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; |