[U-Boot] [PATCH 08/12] macb: Fix return values of macb_eth_initialize()

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


On Sunday 24 January 2010 05:07:46 Matthias Kaehlcke wrote:
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -500,7 +500,7 @@ int macb_eth_initialize(int id, void *regs, unsigned
>  int phy_addr) macb = malloc(sizeof(struct macb_device));
>  	if (!macb) {
>  		printf("Error: Failed to allocate memory for MACB%d\n", id);
> -		return -1;
> +		return 0;
>  	}

this is an error path thus the current code is correct
-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/9cd210ad/attachment.pgp 


More information about the U-Boot mailing list