summaryrefslogtreecommitdiff
path: root/drivers/net/uli526x.c
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 /drivers/net/uli526x.c
parentd3a6532cbe263d992f49e86ac95bede28e96f9c8 (diff)
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 'drivers/net/uli526x.c')
-rw-r--r--drivers/net/uli526x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 1267c5798f0..8460f6928de 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -279,12 +279,12 @@ static int uli526x_init_one(struct eth_device *dev, bd_t *bis)
db->desc_pool_ptr = (uchar *)&desc_pool_array[0];
db->desc_pool_dma_ptr = (dma_addr_t)&desc_pool_array[0];
if (db->desc_pool_ptr == NULL)
- return 0;
+ return -1;
db->buf_pool_ptr = &buf_pool[0];
db->buf_pool_dma_ptr = (dma_addr_t)&buf_pool[0];
if (db->buf_pool_ptr == NULL)
- return 0;
+ return -1;
db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr;
db->first_tx_desc_dma = db->desc_pool_dma_ptr;
@@ -331,7 +331,7 @@ static int uli526x_init_one(struct eth_device *dev, bd_t *bis)
db->cr6_data |= ULI526X_TXTH_256;
db->cr0_data = CR0_DEFAULT;
uli526x_init(dev);
- return 1;
+ return 0;
}
static void uli526x_disable(struct eth_device *dev)