leds: pwm: Simplify with resource-managed devm_led_classdev_register()
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 7 Dec 2018 12:32:51 +0000 (13:32 +0100)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Sat, 8 Dec 2018 17:59:35 +0000 (18:59 +0100)
commite5a0436dd08a18834c134ffd08295e36c6f85219
treed64cb663792ad71cbb4f43747f093b325b63e833
parentb086592e5dcd9cee360f44be801fbcadb24d5c46
leds: pwm: Simplify with resource-managed devm_led_classdev_register()

Simplify the exit path with resource-managed version of registering LED
class device.  The code should be functionally the same, except that on
device removal the led_pwm_priv->num_leds is not decremented to zero
(which should not have any effect as device is going away).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
drivers/leds/leds-pwm.c