public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: rpurdie@rpsys.net, raph@8d.com, tpiepho@freescale.com
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] gpio led: properly initialize return value
Date: Mon, 18 Oct 2010 12:53:39 -0300	[thread overview]
Message-ID: <1287417219.4214.5.camel@cowboy> (raw)

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




             reply	other threads:[~2010-10-18 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 15:53 Davidlohr Bueso [this message]
2010-10-21 21:21 ` [PATCH] gpio led: properly initialize return value Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287417219.4214.5.camel@cowboy \
    --to=dave@gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raph@8d.com \
    --cc=rpurdie@rpsys.net \
    --cc=tpiepho@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox