[PATCH] smc911x: make smc911x_initialize return correct value
Mike Rapoport
mike at compulab.co.il
Tue Nov 10 14:31:46 CET 2009
Make smc911x_initialize return -1 on error and number of interfaces
detected otherwise.
Signed-off-by: Mike Rapoport <mike at compulab.co.il>
---
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 acc2306..5d51406 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;
}
--
1.6.0.6
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
--
Sincerely yours,
Mike.
More information about the U-Boot
mailing list