Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1e653acc authored by Axel Lin's avatar Axel Lin Committed by Richard Purdie
Browse files

leds: leds-ss4200: fix led_classdev_unregister twice in error handling



In current implementation, if device_create_file failed in register_nasgpio_led,
led_classdev_unregister will be executed twice.
( in register_nasgpio_led it calls led_classdev_unregister before return and in nas_gpio_init out_err )

This patch fixes it by only unregistering those that were successfully registered in out_err.
( not including last failed register_nasgpio_led call )

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarDave Hansen <dave@sr71.net>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent 7e1ce34f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment