leds: leds-cobalt-qube: Use devm_led_classdev_register
authorVaishali Thakkar <vthakkar1994@gmail.com>
Fri, 4 Sep 2015 10:12:01 +0000 (12:12 +0200)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Tue, 3 Nov 2015 07:59:09 +0000 (08:59 +0100)
commitaa4e2524955971730ff845c0589f2f8f441ad610
tree6d26c2b5bf1f2f3f47aa261f56e6ac12a9b20061
parent6a13feb9c82803e2b815eca72fa7a9f5561d7861
leds: leds-cobalt-qube: Use devm_led_classdev_register

Use resource-managed function devm_led_classdev_register instead
of led_classdev_register to make the error-path simpler.

To be compatible with the change, goto is replaced with direct
return, unneeded label err_null is dropped and unnecessary variable
retval is removed. Also, remove redundant cobalt_qube_led_remove.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
drivers/leds/leds-cobalt-qube.c