提交 25672b9d 编写于 作者: D Davidlohr Bueso 提交者: Linus Torvalds

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: NDavidlohr Bueso <dave@gnu.org>
Acked-by: NRichard Purdie <rpurdie@linux.intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5991e154
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册