[U-Boot] [PATCH v2 6/6] mx6slevk: Return from cpu_eth_init() directly

Fabio Estevam festevam at gmail.com
Sat Jan 4 20:36:33 CET 2014


From: Fabio Estevam <fabio.estevam at freescale.com>

There is no need to print an error message when cpu_eth_init() fails because
net/eth.c already prints it.

In order to simplify the code, just return the value from cpu_eth_init(bis)
directly.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 board/freescale/mx6slevk/mx6slevk.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 47c04ce..c496254 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -106,17 +106,9 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_FEC_MXC
 int board_eth_init(bd_t *bis)
 {
-	int ret;
-
 	setup_iomux_fec();
 
-	ret = cpu_eth_init(bis);
-	if (ret) {
-		printf("FEC MXC: %s:failed\n", __func__);
-		return ret;
-	}
-
-	return 0;
+	return cpu_eth_init(bis);
 }
 
 static int setup_fec(void)
-- 
1.8.1.2



More information about the U-Boot mailing list