From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Kaehlcke Date: Sun, 24 Jan 2010 11:07:59 +0100 Subject: [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize() In-Reply-To: References: Message-ID: <20100124100759.GQ18402@darwin> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de sh_eth: Return 1 from sh_eth_initialize() upon successful initialization and 0 in case of failure Signed-off-by: Matthias Kaehlcke --- drivers/net/sh_eth.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 86cc324..330c17c 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -627,21 +627,21 @@ void sh_eth_halt(struct eth_device *dev) int sh_eth_initialize(bd_t *bd) { - int ret = 0; + int ret = 1; struct sh_eth_dev *eth = NULL; struct eth_device *dev = NULL; eth = (struct sh_eth_dev *)malloc(sizeof(struct sh_eth_dev)); if (!eth) { printf(SHETHER_NAME ": %s: malloc failed\n", __func__); - ret = -ENOMEM; + ret = 0; goto err; } dev = (struct eth_device *)malloc(sizeof(struct eth_device)); if (!dev) { printf(SHETHER_NAME ": %s: malloc failed\n", __func__); - ret = -ENOMEM; + ret = 0; goto err; } memset(dev, 0, sizeof(struct eth_device)); -- 1.6.3.1