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

Commit 25672b9d authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Linus Torvalds
Browse files

drivers/leds/leds-gpio.c: properly initialize return value



In the event that none of the configs are set (CONFIG_LEDS_GPIO_PLATFORM,
CONFIG_LEDS_GPIO_OF, CONFIG_LEDS_GPIO_PLATFORM), we will return a bogus
value when initializing the module.

Signed-off-by: default avatarDavidlohr Bueso <dave@gnu.org>
Acked-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5991e154
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -316,7 +316,7 @@ static struct of_platform_driver of_gpio_leds_driver = {


static int __init gpio_led_init(void)
static int __init gpio_led_init(void)
{
{
	int ret;
	int ret = 0;


#ifdef CONFIG_LEDS_GPIO_PLATFORM	
#ifdef CONFIG_LEDS_GPIO_PLATFORM	
	ret = platform_driver_register(&gpio_led_driver);
	ret = platform_driver_register(&gpio_led_driver);