summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-12-28 04:05:28 +0000
committerStefano Babic <sbabic@denx.de>2013-01-05 18:06:12 +0100
commitd22925108e46491900815c9ec3c32122ead80d8e (patch)
tree1b07452f1203c05dbc36eb0c8b31801c6299d694 /board/freescale
parent7093f85c9e6824c153a3ddd645d5065884567305 (diff)
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>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mx53loco/mx53loco.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 63a4f8baf3..b1bfb90389 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -345,12 +345,11 @@ static int power_init(void)
unsigned int val;
int ret = -1;
struct pmic *p;
- int retval;
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");
if (!p)
@@ -370,9 +369,9 @@ static int power_init(void)
}
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");
if (!p)