Messages in this thread Patch in this message | | | From | David Brownell <> | Subject | Re: leds: just ignore invalid GPIOs in leds-gpio | Date | Tue, 7 Apr 2009 17:51:49 -0700 |
| |
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@users.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@users.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);
| |