summaryrefslogtreecommitdiff
path: root/net/eth.c
diff options
context:
space:
mode:
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 425f29edba4..3373a052521 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)