From: Mike Frysinger Date: Sun, 24 Jan 2010 05:57:52 -0500 Subject: [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize() In-Reply-To: <20100124100759.GQ18402@darwin> References: <20100124100759.GQ18402@darwin> Message-ID: <201001240557.52779.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday 24 January 2010 05:07:59 Matthias Kaehlcke wrote: > --- a/drivers/net/sh_eth.c > +++ b/drivers/net/sh_eth.c > 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; > } these are error paths and thus should be -1 -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20100124/23f3a6c3/attachment.pgp