summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-lp5562.c
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2020-07-16 21:20:00 +0300
committerPavel Machek <pavel@ucw.cz>2020-07-22 15:42:06 +0300
commitc732eaf01f9c213d34b2d224bcda830089bbcf8a (patch)
tree4d1a1670b2d4ad32bb5678f1b1e17bc0ad1d47ce /drivers/leds/leds-lp5562.c
parenta89d385daa6a943a8e556d8b8b648403909b33f7 (diff)
downloadlinux-c732eaf01f9c213d34b2d224bcda830089bbcf8a.tar.xz
leds: lp55xx: Convert LED class registration to devm_*
Convert the LED class registration calls to the LED devm_* registration calls. Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-lp5562.c')
-rw-r--r--drivers/leds/leds-lp5562.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/leds/leds-lp5562.c b/drivers/leds/leds-lp5562.c
index edb57c42e8b1..1c94422408b0 100644
--- a/drivers/leds/leds-lp5562.c
+++ b/drivers/leds/leds-lp5562.c
@@ -554,19 +554,17 @@ static int lp5562_probe(struct i2c_client *client,
ret = lp55xx_register_leds(led, chip);
if (ret)
- goto err_register_leds;
+ goto err_out;
ret = lp55xx_register_sysfs(chip);
if (ret) {
dev_err(&client->dev, "registering sysfs failed\n");
- goto err_register_sysfs;
+ goto err_out;
}
return 0;
-err_register_sysfs:
- lp55xx_unregister_leds(led, chip);
-err_register_leds:
+err_out:
lp55xx_deinit_device(chip);
err_init:
return ret;
@@ -580,7 +578,6 @@ static int lp5562_remove(struct i2c_client *client)
lp5562_stop_engine(chip);
lp55xx_unregister_sysfs(chip);
- lp55xx_unregister_leds(led, chip);
lp55xx_deinit_device(chip);
return 0;