aboutsummaryrefslogtreecommitdiffstats
path: root/net/eth.c
diff options
context:
space:
mode:
authorUpakul Barkakaty <upakul@gmail.com>2007-11-29 12:16:13 +0530
committerBen Warren <biggerbadderben@gmail.com>2008-01-03 22:39:51 -0500
commit505be87a65e4f87ad7d8da1d57ea4dcd487d7e32 (patch)
tree4709f78870677807b2f2c99fc86fa33a69d65bfe /net/eth.c
parent5ca2d0953e4579a80810966cca2077e20d912c97 (diff)
downloadu-boot-midas-505be87a65e4f87ad7d8da1d57ea4dcd487d7e32.tar.gz
u-boot-midas-505be87a65e4f87ad7d8da1d57ea4dcd487d7e32.tar.bz2
u-boot-midas-505be87a65e4f87ad7d8da1d57ea4dcd487d7e32.zip
NET: Proper return code handling in eth_init() function in file eth.c
This patch modifies the return code handling in the eth_init() function, to be compatible with the handling of the return codes in the other network stack files. It now returns a 0 on Success and -1 on error. Signed-off-by: Upakul Barkakaty <upakul.barkakaty@conexant.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/eth.c')
-rw-r--r--net/eth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/eth.c b/net/eth.c
index 425f29edba..3373a05252 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -424,23 +424,23 @@ int eth_init(bd_t *bis)
struct eth_device* old_current;
if (!eth_current)
- return 0;
+ return -1;
old_current = eth_current;
do {
debug ("Trying %s\n", eth_current->name);
- if (eth_current->init(eth_current, bis)) {
+ if (!eth_current->init(eth_current,bis)) {
eth_current->state = ETH_STATE_ACTIVE;
- return 1;
+ return 0;
}
debug ("FAIL\n");
eth_try_another(0);
} while (old_current != eth_current);
- return 0;
+ return -1;
}
void eth_halt(void)