mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
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 <dave@gnu.org> Acked-by: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5991e154b2
commit
25672b9dde
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user