From 422b1a01602b6e2fbf8444a1192c7ba31461fd4c Mon Sep 17 00:00:00 2001 From: Ben Warren Date: Wed, 9 Jan 2008 18:15:53 -0500 Subject: 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 Acked-by: Stefan Roese Acked-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Kim Phillips Acked-by: Haavard Skinnemoen Acked-By: Timur Tabi --- drivers/net/dc2114x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/dc2114x.c') diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index d5275dc..7238922 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -332,7 +332,7 @@ static int dc21x4x_init(struct eth_device* dev, bd_t* bis) if ((INL(dev, DE4X5_STS) & (STS_TS | STS_RS)) != 0) { printf("Error: Cannot reset ethernet controller.\n"); - return 0; + return -1; } #ifdef CONFIG_TULIP_SELECT_MEDIA @@ -382,7 +382,7 @@ static int dc21x4x_init(struct eth_device* dev, bd_t* bis) send_setup_frame(dev, bis); - return 1; + return 0; } static int dc21x4x_send(struct eth_device* dev, volatile void *packet, int length) -- cgit v1.1