[U-Boot] [PATCH 2/3] mx28evk: Propagate the error if cpu_eth_init() fails

Marek Vasut marex at denx.de
Mon Sep 23 01:59:03 CEST 2013


Dear Fabio Estevam,

> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> If cpu_eth_init() fails we should return the error immediately.
> 
> Cc: Marek Vasut <marex at denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>

Acked-by: Marek Vasut <marex at denx.de>

> ---
>  board/denx/m28evk/m28evk.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
> index f4453d6..33d38cf 100644
> --- a/board/denx/m28evk/m28evk.c
> +++ b/board/denx/m28evk/m28evk.c
> @@ -116,6 +116,8 @@ int board_eth_init(bd_t *bis)
>  	int ret;
> 
>  	ret = cpu_eth_init(bis);
> +	if (ret)
> +		return ret;
> 
>  	clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
>  		CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,

Best regards,
Marek Vasut


More information about the U-Boot mailing list