From: Mike Rapoport Date: Thu, 12 Nov 2009 13:35:08 +0000 (+0200) Subject: smc911x: make smc911x_initialize return correct value X-Git-Tag: v2009.11-rc2~57^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbd47b6753b08162436d9ccad1e63c8d43ede54c;p=u-boot smc911x: make smc911x_initialize return correct value Make smc911x_initialize return -1 on error and number of interfaces detected otherwise. Signed-off-by: Mike Rapoport Acked-by: Mike Frysinger Signed-off-by: Ben Warren --- diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index c50758e532..c027abe9f7 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -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; }