leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe
authorAxel Lin <axel.lin@gmail.com>
Mon, 17 May 2010 09:47:48 +0000 (17:47 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 26 May 2010 12:07:55 +0000 (13:07 +0100)
commit7e1ce34f25c984a93dc0a2d8c217f7f78516b376
tree9c34d31b78f255e6ff00107075ca340c09ba8970
parent569762ef3dcf8fc5aecdb059d8c0741b90fe1d17
leds: leds-lp3944: properly handle lp3944_configure fail in lp3944_probe

In current implementation, lp3944_probe return 0 even if lp3944_configure fail.
Therefore, led_classdev_unregister will be executed twice
( in error handling of lp3944_configure and lp3944_remove ).
This patch properly handles lp3944_configure fail in lp3944_probe.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/leds/leds-lp3944.c