From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 04 Jun 2010 16:01:09 -0500 Subject: [U-Boot] [PATCH] tsec: fix the return value for tsec_eth_init() In-Reply-To: <254C866E-B460-47D7-8CCC-9C8F200189C1@freescale.com> References: <1275684642-17608-1-git-send-email-timur@freescale.com> <254C866E-B460-47D7-8CCC-9C8F200189C1@freescale.com> Message-ID: <4C096995.4090101@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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?