lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 7 Apr 2009 17:51:49 -0700
From:	David Brownell <david-b@...bell.net>
To:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Cc:	Richard Purdie <rpurdie@...ux.intel.com>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>
Subject: Re: leds: just ignore invalid GPIOs in leds-gpio

On Tuesday 07 April 2009, Geert Uytterhoeven wrote:
> | drivers/leds/leds-gpio.c:85: warning: 'return' with no value, in function
> | returning non-void
> 
> So what should we return here? -ENODEV? -EINVAL? Anything else?

Success:  0.  The point is to ignore them, not fail!


See the appended.

- Dave

========== CUT HERE
From: David Brownell <dbrownell@...rs.sourceforge.net>

Fix build problems with leds-gpio:

  CC      drivers/leds/leds-gpio.o
drivers/leds/leds-gpio.c: In function 'create_gpio_led':
drivers/leds/leds-gpio.c:85: warning: 'return' with no value, in function returning non-void

Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>

---
 drivers/leds/leds-gpio.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -82,7 +84,7 @@ static int __devinit create_gpio_led(con
 	if (!gpio_is_valid(template->gpio)) {
 		printk(KERN_INFO "Skipping unavilable LED gpio %d (%s)\n", 
 				template->gpio, template->name);
-		return;
+		return 0;
 	}
 
 	ret = gpio_request(template->gpio, template->name);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ