* [PATCH 17/33] leds-lp55xx: fix error condition in lp55xx_register_leds()
@ 2012-12-12 14:02 Kim, Milo
0 siblings, 0 replies; only message in thread
From: Kim, Milo @ 2012-12-12 14:02 UTC (permalink / raw)
To: Bryan Wu; +Cc: linux-leds, linux-kernel
Use lp55xx_unregister_leds() rather than duplicate code.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
---
drivers/leds/leds-lp55xx-common.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
index b423539..470601b 100644
--- a/drivers/leds/leds-lp55xx-common.c
+++ b/drivers/leds/leds-lp55xx-common.c
@@ -344,11 +344,7 @@ int lp55xx_register_leds(struct lp55xx_led *led, struct lp55xx_chip *chip)
return 0;
err_init_led:
- for (i = 0; i < chip->num_leds; i++) {
- each = led + i;
- led_classdev_unregister(&each->cdev);
- flush_work(&each->brightness_work);
- }
+ lp55xx_unregister_leds(led, chip);
return ret;
}
EXPORT_SYMBOL_GPL(lp55xx_register_leds);
--
1.7.9.5
Best Regards,
Milo
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-12 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-12 14:02 [PATCH 17/33] leds-lp55xx: fix error condition in lp55xx_register_leds() Kim, Milo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).