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, various gotos are replced with
direct returns and unneeded labels are dropped. Also, remove
fsg_led_remove as it is now redundant.
Signed-off-by: Vaishali Thakkar <vthakkar1994@xxxxxxxxx>
---
Changes since v1:
- Fix build errors
---
drivers/leds/leds-fsg.c | 52 ++++++++++++-------------------------------------
1 file changed, 12 insertions(+), 40 deletions(-)