Skip to contentSkip to conversation

mx53ard: Initialize return code with error

PATCH New Fabio Estevam 2 participants 3 messages Mar 19, 2012 – Mar 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx53ard: Initialize return code with error

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.

---
 board/freescale/mx53ard/mx53ard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/freescale/mx53ard/mx53ard.c +1 -1
index e90e39e..2d21584 100644
@@ -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();
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 mx53ard: Initialize return code with error

Quoted 14 lines · Fabio Estevam

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.

---
 board/freescale/mx53ard/mx53ard.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/freescale/mx53ard/mx53ard.c +0 -0
index e90e39e..2d21584 100644

board/freescale/mx53ard/mx53ard.c int board_init(void) · line 293

Quoted 8 lines
board/freescale/mx53ard/mx53ard.c +1 -1
@@ -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();

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================
#2 lore raw

PATCH 1/1 mx53ard: Initialize return code with error

In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

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.

---

Applied to u-boot-imx, thanks

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================