public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio led: properly initialize return value
@ 2010-10-18 15:53 Davidlohr Bueso
  2010-10-21 21:21 ` Davidlohr Bueso
  0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2010-10-18 15:53 UTC (permalink / raw)
  To: rpurdie, raph, tpiepho; +Cc: LKML

gpio led: properly initialize return value in gpio_led_init()

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 bogus when initializing the module.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 drivers/leds/leds-gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index ea57e05..4d9fa38 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);
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio led: properly initialize return value
  2010-10-18 15:53 [PATCH] gpio led: properly initialize return value Davidlohr Bueso
@ 2010-10-21 21:21 ` Davidlohr Bueso
  0 siblings, 0 replies; 2+ messages in thread
From: Davidlohr Bueso @ 2010-10-21 21:21 UTC (permalink / raw)
  To: rpurdie; +Cc: raph, tpiepho, LKML

On Mon, 2010-10-18 at 12:53 -0300, Davidlohr Bueso wrote:
> gpio led: properly initialize return value in gpio_led_init()
> 
> 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 bogus when initializing the module.
> 

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
> ---
>  drivers/leds/leds-gpio.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index ea57e05..4d9fa38 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);



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-21 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 15:53 [PATCH] gpio led: properly initialize return value Davidlohr Bueso
2010-10-21 21:21 ` Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox