[U-Boot] [PATCH 10/12] plb2800: Fix return values of plb2800_eth_initialize()

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


plb2800: Return 1 from plb2800_eth_initialize() upon successful initialization
and 0 in case of failure

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

diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c
index d799c73..ccbced2 100644
--- a/drivers/net/plb2800_eth.c
+++ b/drivers/net/plb2800_eth.c
@@ -106,7 +106,7 @@ int plb2800_eth_initialize(bd_t * bis)
 	if (!(dev = (struct eth_device *) malloc (sizeof *dev)))
 	{
 		printf("Failed to allocate memory\n");
-		return -1;
+		return 0;
 	}
 	memset(dev, 0, sizeof(*dev));
 
@@ -141,7 +141,7 @@ int plb2800_eth_initialize(bd_t * bis)
 	printf("Leaving plb2800_eth_initialize()\n");
 #endif
 
-	return 0;
+	return 1;
 }
 
 static int plb2800_eth_init(struct eth_device *dev, bd_t * bis)
-- 
1.6.3.1



More information about the U-Boot mailing list