diff mbox

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

Message ID 1379705450-14684-1-git-send-email-festevam@gmail.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Fabio Estevam Sept. 20, 2013, 7:30 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

If cpu_eth_init() fails we should return the error immediately.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx28evk/mx28evk.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefano Babic Sept. 27, 2013, 12:04 p.m. UTC | #1
On 20/09/2013 21:30, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> If cpu_eth_init() fails we should return the error immediately.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx (fix), thanks!

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 3abf1fd..5005fe2 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -103,6 +103,8 @@  int board_eth_init(bd_t *bis)
 	int ret;
 
 	ret = cpu_eth_init(bis);
+	if (ret)
+		return ret;
 
 	/* MX28EVK uses ENET_CLK PAD to drive FEC clock */
 	writel(CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN,