From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 20 Mar 2012 07:41:16 +0100 Subject: [U-Boot] [PATCH] mx53ard: Initialize return code with error In-Reply-To: <1332200485-3647-1-git-send-email-festevam@gmail.com> References: <1332200485-3647-1-git-send-email-festevam@gmail.com> Message-ID: <4F68268C.7030606@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 20/03/2012 00:41, Fabio Estevam wrote: > The variable "rc" is the return of board_eth_init() function. Initialize > it with an error code, so that this function can return an error when > CONFIG_SMC911X is not set. > > Signed-off-by: Fabio Estevam > --- > board/freescale/mx53ard/mx53ard.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c > index e90e39e..2d21584 100644 > --- a/board/freescale/mx53ard/mx53ard.c > +++ b/board/freescale/mx53ard/mx53ard.c > @@ -287,7 +287,7 @@ int board_init(void) > > int board_eth_init(bd_t *bis) > { > - int rc = 0; > + int rc = -ENODEV; > > weim_smc911x_iomux(); > weim_cs1_settings(); Acked-by: Stefano Babic Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================