diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-11-12 15:35:08 +0200 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2009-11-12 21:25:57 -0800 |
commit | fbd47b6753b08162436d9ccad1e63c8d43ede54c (patch) | |
tree | 08d7407f3b3412e2c5a5ff479b015685a29b4097 /drivers | |
parent | c44efcf97b335dcef7d014f65b7d3094e79adb13 (diff) | |
download | u-boot-imx-fbd47b6753b08162436d9ccad1e63c8d43ede54c.zip u-boot-imx-fbd47b6753b08162436d9ccad1e63c8d43ede54c.tar.gz u-boot-imx-fbd47b6753b08162436d9ccad1e63c8d43ede54c.tar.bz2 |
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 <mike@compulab.co.il>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/smc911x.c | 4 |
1 files 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; } |