[U-Boot] [PATCH] tsec: fix the return value for tsec_eth_init()

Timur Tabi timur at freescale.com
Fri Jun 4 23:01:09 CEST 2010


Andy Fleming wrote:

> The old way continued even if one of the tsecs failed to initialize.  Let's preserve the original behavior in that sense:
> 
> for (i = 0; i < num; i++) {
> 	ret = tsec_initialize(bis, &tsecs[i]);
> 	if (ret >= 0)
> 		count++;
> }

This code has multiple levels to it.  board_eth_init() calls
tsec_eth_init(), pci_eth_init(), and maybe some other functions.
tsec_eth_init() calls tsec_initialize().  tsec_initialize() calls
init_phy().  Are we always going to ignore an error return code?  Why don't
we just eliminate the possibility of returning a negative number at all levels?



More information about the U-Boot mailing list