فهرست منبع

mx53loco: Remove unneeded 'retval' variable

commit c73368150 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) introduced an extra 'retval' variable, but this is not
necessary since we have already the variable 'ret' in place.

So use 'ret' to store the return values from the pmic related calls and remove
'retval'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam 12 سال پیش
والد
کامیت
d22925108e
1فایلهای تغییر یافته به همراه6 افزوده شده و 7 حذف شده
  1. 6 7
      board/freescale/mx53loco/mx53loco.c

+ 6 - 7
board/freescale/mx53loco/mx53loco.c

@@ -345,12 +345,11 @@ static int power_init(void)
 	unsigned int val;
 	unsigned int val;
 	int ret = -1;
 	int ret = -1;
 	struct pmic *p;
 	struct pmic *p;
-	int retval;
 
 
 	if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) {
 	if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) {
-		retval = pmic_dialog_init(I2C_PMIC);
-		if (retval)
-			return retval;
+		ret = pmic_dialog_init(I2C_PMIC);
+		if (ret)
+			return ret;
 
 
 		p = pmic_get("DIALOG_PMIC");
 		p = pmic_get("DIALOG_PMIC");
 		if (!p)
 		if (!p)
@@ -370,9 +369,9 @@ static int power_init(void)
 	}
 	}
 
 
 	if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) {
 	if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) {
-		retval = pmic_init(I2C_PMIC);
-		if (retval)
-			return retval;
+		ret = pmic_init(I2C_PMIC);
+		if (ret)
+			return ret;
 
 
 		p = pmic_get("FSL_PMIC");
 		p = pmic_get("FSL_PMIC");
 		if (!p)
 		if (!p)