From: Davidlohr Bueso Date: Thu, 11 Nov 2010 22:05:24 +0000 (-0800) Subject: drivers/leds/leds-gpio.c: properly initialize return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=25672b9dde18b86e736b8138bcffbaf7158d160a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Davidlohr Bueso Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index ea57e05d08f3..4d9fa38d9ff6 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -316,7 +316,7 @@ static struct of_platform_driver of_gpio_leds_driver = { static int __init gpio_led_init(void) { - int ret; + int ret = 0; #ifdef CONFIG_LEDS_GPIO_PLATFORM ret = platform_driver_register(&gpio_led_driver);