Patchwork [U-Boot] titanium: Return the error when cpu_eth_init() fails

login
register
mail settings
Submitter Fabio Estevam
Date Nov. 4, 2013, 12:12 a.m.
Message ID <1383523976-11845-1-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/288093/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Fabio Estevam - Nov. 4, 2013, 12:12 a.m.
From: Fabio Estevam <fabio.estevam@freescale.com>

When cpu_eth_init() fails we should not return success.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/titanium/titanium.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefan Roese - Nov. 4, 2013, 7:19 a.m.
Hi Fabio,

On 04.11.2013 01:12, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> When cpu_eth_init() fails we should not return success.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/titanium/titanium.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/freescale/titanium/titanium.c b/board/freescale/titanium/titanium.c
> index 6025eb7..9a317bc 100644
> --- a/board/freescale/titanium/titanium.c
> +++ b/board/freescale/titanium/titanium.c
> @@ -272,7 +272,7 @@ int board_eth_init(bd_t *bis)
>  	if (ret)
>  		printf("FEC MXC: %s:failed\n", __func__);
>  
> -	return 0;
> +	return ret;
>  }
>  
>  int board_early_init_f(void)

Thanks.

Acked-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Stefano Babic - Nov. 13, 2013, 9:14 a.m.
On 04/11/2013 01:12, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> When cpu_eth_init() fails we should not return success.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/board/freescale/titanium/titanium.c b/board/freescale/titanium/titanium.c
index 6025eb7..9a317bc 100644
--- a/board/freescale/titanium/titanium.c
+++ b/board/freescale/titanium/titanium.c
@@ -272,7 +272,7 @@  int board_eth_init(bd_t *bis)
 	if (ret)
 		printf("FEC MXC: %s:failed\n", __func__);
 
-	return 0;
+	return ret;
 }
 
 int board_early_init_f(void)