[U-Boot] [PATCH 04/12] fec_mxc: Fix return values of fec_probe()

Mike Frysinger vapier at gentoo.org
Sun Jan 24 11:59:48 CET 2010


On Sunday 24 January 2010 05:07:29 Matthias Kaehlcke wrote:
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -667,7 +667,7 @@ static int fec_probe(bd_t *bd)
>  	edev = (struct eth_device *)malloc(sizeof(struct eth_device));
>  	if (!edev) {
>  		puts("fec_imx27: not enough malloc memory!\n");
> -		return -ENOMEM;
> +		return 0;
>  	}

error path should return -1, not 0
-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/3bf31079/attachment.pgp 


More information about the U-Boot mailing list