From fbd47b6753b08162436d9ccad1e63c8d43ede54c Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Thu, 12 Nov 2009 15:35:08 +0200 Subject: [PATCH] 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 --- drivers/net/smc911x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index c50758e..c027abe 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; } -- 2.7.4