diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-09-20 19:30:50 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2013-09-27 11:53:35 (GMT) |
commit | a05f4ab6cc84a92c02ff1dbe2eb8a70161de4cbb (patch) | |
tree | 678af4b6efd8cc3e9f432e4c7bc78522f47d2777 /board/freescale | |
parent | 17cc2362afe504eda574948d3d653a19a29ceb76 (diff) | |
download | u-boot-fsl-qoriq-a05f4ab6cc84a92c02ff1dbe2eb8a70161de4cbb.tar.xz |
mx35pdk: Fix error handling in board_late_init()
If smc911x_initialize() fails we should return the error immediately.
While at it, also check the error from cpu_eth_init().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/mx35pdk/mx35pdk.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c index 427c83a..9fabef5 100644 --- a/board/freescale/mx35pdk/mx35pdk.c +++ b/board/freescale/mx35pdk/mx35pdk.c @@ -251,14 +251,12 @@ int board_late_init(void) int board_eth_init(bd_t *bis) { - int rc = -ENODEV; #if defined(CONFIG_SMC911X) - rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); + int rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); + if (rc) + return rc; #endif - - cpu_eth_init(bis); - - return rc; + return cpu_eth_init(bis); } #if defined(CONFIG_FSL_ESDHC) |