From: Mike Frysinger Date: Wed, 9 Mar 2011 02:35:39 -0500 Subject: [U-Boot] [PATCH v2 1/2] net: axi_ethernet: Add driver to u-boot v2 In-Reply-To: <1299594353-15887-1-git-send-email-monstr@monstr.eu> References: <1299594353-15887-1-git-send-email-monstr@monstr.eu> Message-ID: <201103090235.39906.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 Tuesday, March 08, 2011 09:25:52 Michal Simek wrote: > +int xilinx_axiemac_initialize(bd_t *bis, int base_addr, int dma_addr) > +{ > + struct eth_device *dev; > + struct axidma_priv *dma; > + > + dev = calloc(1, sizeof(struct eth_device)); > + if (dev == NULL) > + return -1; > + > + dev->priv = calloc(1, sizeof(struct axidma_priv)); > + if (dev->priv == NULL) > + return -1; this 2nd error checker should call free(dev). the rest is copacetic. -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/20110309/9452524c/attachment.pgp