Re: leds: just ignore invalid GPIOs in leds-gpio

From: Richard Purdie
Date: Wed Apr 08 2009 - 09:12:24 EST



On Tue, 2009-04-07 at 17:51 -0700, David Brownell wrote:
> 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.

Agreed. I wondered about returning ENODEV and then catching it in the
calling functions but that doesn't work out as very clear code. I'll
queue and submit this.

Cheers,

Richard


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