summaryrefslogtreecommitdiffstats
path: root/cpu/ixp
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2008-01-09 18:15:53 -0500
committerWolfgang Denk <wd@denx.de>2008-01-10 01:06:02 +0100
commit422b1a01602b6e2fbf8444a1192c7ba31461fd4c (patch)
treee8891bc2519ddd636e32fe2b42945786dbce1f44 /cpu/ixp
parentd3a6532cbe263d992f49e86ac95bede28e96f9c8 (diff)
downloadu-boot-422b1a01602b6e2fbf8444a1192c7ba31461fd4c.tar.gz
u-boot-422b1a01602b6e2fbf8444a1192c7ba31461fd4c.tar.xz
u-boot-422b1a01602b6e2fbf8444a1192c7ba31461fd4c.zip
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>
Diffstat (limited to 'cpu/ixp')
-rw-r--r--cpu/ixp/npe/npe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu/ixp/npe/npe.c b/cpu/ixp/npe/npe.c
index 7e4af44105..a33b956975 100644
--- a/cpu/ixp/npe/npe.c
+++ b/cpu/ixp/npe/npe.c
@@ -408,25 +408,25 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
if (ixEthAccPortRxCallbackRegister(p_npe->eth_id, npe_rx_callback,
(u32)p_npe) != IX_ETH_ACC_SUCCESS) {
printf("can't register RX callback!\n");
- return 0;
+ return -1;
}
if (ixEthAccPortTxDoneCallbackRegister(p_npe->eth_id, npe_tx_callback,
(u32)p_npe) != IX_ETH_ACC_SUCCESS) {
printf("can't register TX callback!\n");
- return 0;
+ return -1;
}
npe_set_mac_address(dev);
if (ixEthAccPortEnable(p_npe->eth_id) != IX_ETH_ACC_SUCCESS) {
printf("can't enable port!\n");
- return 0;
+ return -1;
}
p_npe->active = 1;
- return 1;
+ return 0;
}
#if 0 /* test-only: probably have to deal with it when booting linux (for a clean state) */