[U-Boot] [PATCH v2 5/7] i2c: at91_i2c: Change error return -ENODEV to -EINVAL

Heiko Schocher hs at denx.de
Mon Sep 19 07:58:46 CEST 2016


Hello Wenyou Yang,

Am 18.09.2016 um 08:53 schrieb Wenyou Yang:
> Change the error return value -ENODEV from to -EINVAL for more
> reasonable.
>
> Signed-off-by: Wenyou Yang <wenyou.yang at atmel.com>
> ---
>
> Changes in v2: None
>
>   drivers/i2c/at91_i2c.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Heiko Schocher <hs at denx.de>

bye,
Heiko
>
> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
> index 73f29e3..472420b 100644
> --- a/drivers/i2c/at91_i2c.c
> +++ b/drivers/i2c/at91_i2c.c
> @@ -190,7 +190,7 @@ static int at91_i2c_enable_clk(struct udevice *dev)
>
>   	clk_rate = clk_get_rate(&clk);
>   	if (!clk_rate)
> -		return -ENODEV;
> +		return -EINVAL;
>
>   	bus->bus_clk_rate = clk_rate;
>
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list