From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Kaehlcke Date: Sun, 24 Jan 2010 14:10:04 +0100 Subject: [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize() In-Reply-To: <201001240557.52779.vapier@gentoo.org> References: <20100124100759.GQ18402@darwin> <201001240557.52779.vapier@gentoo.org> Message-ID: <20100124131004.GS18402@darwin> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mike, El Sun, Jan 24, 2010 at 05:57:52AM -0500 Mike Frysinger ha dit: > 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 you are right if Ben makes the change in net/eth.c he proposed -- Matthias Kaehlcke Embedded Linux Developer Barcelona Representation of the world, like the world itself, is the work of men; they describe it from their own point of view, which they confuse with the absolute truth (Simone de Beauvoir) .''`. using free software / Debian GNU/Linux | http://debian.org : :' : `. `'` gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-