Patchwork [U-Boot,2/2] mx6qsabreauto: Return error if cpu_eth_init() fails

login
register
mail settings
Submitter Fabio Estevam
Date Sept. 13, 2013, 1:03 a.m.
Message ID <1379034203-4753-2-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/274627/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Fabio Estevam - Sept. 13, 2013, 1:03 a.m.
From: Fabio Estevam <fabio.estevam@freescale.com>

Currently board_eth_init() always return 0, but we should propagate the error 
when cpu_eth_init() fails.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefano Babic - Sept. 20, 2013, 4:07 p.m.
On 13/09/2013 03:03, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Currently board_eth_init() always return 0, but we should propagate the error 
> when cpu_eth_init() fails.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---


Applied to u-boot-imx, thanks!

Best regards,
Stefano Babic

Patch

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 1cdf2cb..c55ee87 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -200,7 +200,7 @@  int board_eth_init(bd_t *bis)
 	if (ret)
 		printf("FEC MXC: %s:failed\n", __func__);
 
-	return 0;
+	return ret;
 }
 
 #define BOARD_REV_B  0x200