Re: [PATCH] MX1/MX2: -EINVAL overwritten in second iteration inmxc_gpio_setup_multiple_pins()

From: Uwe Kleine-König
Date: Wed Feb 03 2010 - 15:57:02 EST


On Wed, Feb 03, 2010 at 08:19:00PM +0100, Roel Kluin wrote:
> Due to the `ret = gpio_request()' below in the loop, the initial -EINVAL value
> of ret is overwritten.
>
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

> ---
> Not 100% sure this is needed, please review. One more question: is it ok
> to return 0 when count is 0 (and nothing is done)?
I'd say yes. If you want nothing from me, I can say I gave you all you
wanted without doing anything.

Thanks
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
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/