mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
Fix Ethernet init() return codes
Change return values of init() functions in all Ethernet drivers to conform to the following: >=0: Success <0: Failure All drivers going forward should return 0 on success. Current drivers that return 1 on success were left as-is to minimize changes. Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-By: Timur Tabi <timur@freescale.com>
This commit is contained in:
parent
d3a6532cbe
commit
422b1a0160
13 changed files with 28 additions and 27 deletions
|
@ -402,7 +402,7 @@ static int pcnet_init(struct eth_device* dev, bd_t *bis)
|
|||
if (i <= 0) {
|
||||
printf("%s: TIMEOUT: controller init failed\n", dev->name);
|
||||
pcnet_reset (dev);
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -410,7 +410,7 @@ static int pcnet_init(struct eth_device* dev, bd_t *bis)
|
|||
*/
|
||||
pcnet_write_csr (dev, 0, 0x0002);
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pcnet_send(struct eth_device* dev, volatile void *packet, int pkt_len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue