[PATCH v1 1/4] leds: max5970: Remove unused variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 drivers/leds/leds-max5970.c | 3 +--
 1 file changed, 1 insertion(+), 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;
-- 
2.43.0.rc1.1.gbec44491f096





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux