[U-Boot] [PATCH 04/12] fec_mxc: Fix return values of fec_probe()

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


fec_mxc: Return 1 from fec_probe() upon successfully initialization and 0 in
case of failure

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

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 19116f2..dc8a020 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -667,7 +667,7 @@ static int fec_probe(bd_t *bd)
 	edev = (struct eth_device *)malloc(sizeof(struct eth_device));
 	if (!edev) {
 		puts("fec_imx27: not enough malloc memory!\n");
-		return -ENOMEM;
+		return 0;
 	}
 	edev->priv = fec;
 	edev->init = fec_init;
@@ -732,7 +732,7 @@ static int fec_probe(bd_t *bd)
 	memcpy(edev->enetaddr, ethaddr, 6);
 	fec_set_hwaddr(edev, ethaddr);
 
-	return 0;
+	return 1;
 }
 
 int fecmxc_initialize(bd_t *bd)
-- 
1.6.3.1



More information about the U-Boot mailing list