Skip to content

Commit

Permalink
drivers/leds/leds-gpio.c: properly initialize return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Davidlohr Bueso authored and torvalds committed Nov 12, 2010
1 parent 5991e15 commit 25672b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25672b9

Please sign in to comment.