Skip to contentSkip to conversation

smc911x: make smc911x_initialize return correct value

PATCH New Mike Rapoport 1 participant 1 message Nov 10, 2009 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smc911x: make smc911x_initialize return correct value

Make smc911x_initialize return -1 on error and number of interfaces detected otherwise.

---
 drivers/net/smc911x.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/smc911x.c +2 -2
index acc2306..5d51406 100644
@@ -243,7 +243,7 @@ int smc911x_initialize(u8 dev_num, int base_addr)
 	dev = malloc(sizeof(*dev));
 	if (!dev) {
 		free(dev);
-		return 0;
+		return -1;
 	}
 	memset(dev, 0, sizeof(*dev));
 
@@ -271,5 +271,5 @@ int smc911x_initialize(u8 dev_num, int base_addr)
 	sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
 
 	eth_register(dev);
-	return 0;
+	return 1;
 }
Signature · 1 line
1.6.0.6
Quoted 7 lines

------------------------------------------------------------------------

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 2 lines
Sincerely yours,
Mike.