diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-02-27 16:36:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-04-06 11:16:13 +0200 |
commit | f9dccf98a3acbe1763d3d75cf455c0b1b0de51a5 (patch) | |
tree | cd35ea835b1d7c99f8e5bae5964c14a913325ad3 /net/eth.c | |
parent | b7ed4d8fa925c5c686b771027ec35efb1d9e4be1 (diff) | |
download | barebox-f9dccf98a3acbe1763d3d75cf455c0b1b0de51a5.tar.gz barebox-f9dccf98a3acbe1763d3d75cf455c0b1b0de51a5.tar.xz |
eth.c: Fix return values
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/eth.c')
-rw-r--r-- | net/eth.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -45,11 +45,9 @@ struct eth_device * eth_get_current(void) int eth_open(void) { if (!eth_current) - return 0; + return -ENODEV; - eth_current->open(eth_current); - - return 0; + return eth_current->open(eth_current); } void eth_halt(void) @@ -65,7 +63,7 @@ void eth_halt(void) int eth_send(void *packet, int length) { if (!eth_current) - return -1; + return -ENODEV; return eth_current->send(eth_current, packet, length); } @@ -73,7 +71,7 @@ int eth_send(void *packet, int length) int eth_rx(void) { if (!eth_current) - return -1; + return -ENODEV; return eth_current->recv(eth_current); } |