Messages in this thread Patch in this message | | | From | "Kim, Milo" <> | Subject | [PATCH 17/33] leds-lp55xx: fix error condition in lp55xx_register_leds() | Date | Wed, 12 Dec 2012 14:02:04 +0000 |
| |
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
| |