leds: leds-ot200: Use devm_led_classdev_register
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Sat, 5 Sep 2015 14:23:27 +0000 (19:53 +0530)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Tue, 3 Nov 2015 07:59:13 +0000 (08:59 +0100)
commit583a2b2cd73c13a91b5f529466dec4d27716d226
tree7cc9056db93ccff6b502fe5826d0fee88850f1c3
parentc0fc68ba97b0f96fa4aaa6010ead6b77d3ffc3dd
leds: leds-ot200: Use devm_led_classdev_register

Use resource-managed function devm_led_classdev_register
instead of led_classdev_register to make the error path simpler.
The goto is replaced with direct return, unneeded label err is
dropped. Also, remove redundant ot200_led_remove.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
drivers/leds/leds-ot200.c