[U-Boot] [PATCH 08/12] macb: Fix return values of macb_eth_initialize()

Matthias Kaehlcke matthias at kaehlcke.net
Sun Jan 24 11:07:46 CET 2010


macb: Return 1 from macb_eth_initialize() upon successful initialization and 0
in case of failure

Signed-off-by: Matthias Kaehlcke <matthias at kaehlcke.net>
---
 drivers/net/macb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c184353..e2a0724 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -500,7 +500,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 	macb = malloc(sizeof(struct macb_device));
 	if (!macb) {
 		printf("Error: Failed to allocate memory for MACB%d\n", id);
-		return -1;
+		return 0;
 	}
 	memset(macb, 0, sizeof(struct macb_device));
 
@@ -542,7 +542,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)
 
 	eth_register(netdev);
 
-	return 0;
+	return 1;
 }
 
 #endif
-- 
1.6.3.1



More information about the U-Boot mailing list