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>
This commit is contained in:
Jacek Anaszewski 2015-04-16 00:30:50 -07:00 • committed by Bryan Wu
commit 0e14e0bfe8