leds: gpio: Fix error handling for led name null pointer case
authorJacek Anaszewski <j.anaszewski@samsung.com>
Thu, 16 Apr 2015 07:30:50 +0000 (00:30 -0700)
committerBryan Wu <cooloney@gmail.com>
Mon, 4 May 2015 18:05:55 +0000 (11:05 -0700)
commit0e14e0bfe85dd22ba19446bdfdc2cf0e941b9731
tree4c90be2e36cd4fd4874cc6e9e6f867028547720b
parent65c6b7e3ab70effc150dacc9c2fbd6581925dd53
leds: gpio: Fix error handling for led name null pointer case

Make sure that already registered LEDs will be torn down properly
if the name of the next LED to create is unavailable.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-gpio.c