[U-Boot] [PATCH v2 1/2] net: axi_ethernet: Add driver to u-boot v2

Mike Frysinger vapier at gentoo.org
Wed Mar 9 08:35:39 CET 2011


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 


More information about the U-Boot mailing list