[U-Boot] [PATCH] microblaze: Fix no return statement from microblaze-generic board

Michal Simek monstr at monstr.eu
Mon Feb 28 10:27:09 CET 2011


Remove compilation warning for systems without network support.

Warning log:
microblaze-generic.c: In function 'board_eth_init':
microblaze-generic.c:82: warning: no return statement in function returning non-void

Signed-off-by: Michal Simek <monstr at monstr.eu>
---
 .../xilinx/microblaze-generic/microblaze-generic.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 183e4dc..5c07fdb 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -71,12 +71,10 @@ int fsl_init2 (void) {
 
 int board_eth_init(bd_t *bis)
 {
-	/*
-	 * This board either has PCI NICs or uses the CPU's TSECs
-	 * pci_eth_init() will return 0 if no NICs found, so in that case
-	 * returning -1 will force cpu_eth_init() to be called.
-	 */
+	int ret = 0;
+
 #ifdef CONFIG_XILINX_EMACLITE
-	return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR);
+	ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR);
 #endif
+	return ret;
 }
-- 
1.5.5.6



More information about the U-Boot mailing list