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

login
register
mail settings
Submitter Michal Simek
Date Feb. 28, 2011, 9:27 a.m.
Message ID <1298885229-26247-4-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/84754/
State Superseded
Delegated to: Michal Simek
Headers show

Comments

Michal Simek - Feb. 28, 2011, 9:27 a.m.
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@monstr.eu>
---
 .../xilinx/microblaze-generic/microblaze-generic.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Patch

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;
 }