diff mbox

[U-Boot] mx53ard: Initialize return code with error

Message ID 1332200485-3647-1-git-send-email-festevam@gmail.com
State Accepted
Commit 19db9be4aa39e9112356c09c511f1c4726b64c74
Headers show

Commit Message

Fabio Estevam March 19, 2012, 11:41 p.m. UTC
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 <fabio.estevam@freescale.com>
---
 board/freescale/mx53ard/mx53ard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefano Babic March 20, 2012, 6:41 a.m. UTC | #1
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 <fabio.estevam@freescale.com>
> ---
>  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 <sbabic@denx.de>

Best regards,
Stefano Babic
Stefano Babic March 23, 2012, 10:37 a.m. UTC | #2
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 <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks

Best regards,
Stefano Babic
diff mbox

Patch

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();