9
0
Fork 0

eth.c: Fix return values

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-02-27 16:36:22 +01:00
parent b7ed4d8fa9
commit f9dccf98a3
1 changed files with 4 additions and 6 deletions

View File

@ -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);
}