Commit d22925108e46491900815c9ec3c32122ead80d8e

Authored by Fabio Estevam
Committed by Stefano Babic
1 parent 7093f85c9e

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>

Showing 1 changed file with 6 additions and 7 deletions Side-by-side Diff

board/freescale/mx53loco/mx53loco.c
... ... @@ -345,12 +345,11 @@
345 345 unsigned int val;
346 346 int ret = -1;
347 347 struct pmic *p;
348   - int retval;
349 348  
350 349 if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) {
351   - retval = pmic_dialog_init(I2C_PMIC);
352   - if (retval)
353   - return retval;
  350 + ret = pmic_dialog_init(I2C_PMIC);
  351 + if (ret)
  352 + return ret;
354 353  
355 354 p = pmic_get("DIALOG_PMIC");
356 355 if (!p)
... ... @@ -370,9 +369,9 @@
370 369 }
371 370  
372 371 if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) {
373   - retval = pmic_init(I2C_PMIC);
374   - if (retval)
375   - return retval;
  372 + ret = pmic_init(I2C_PMIC);
  373 + if (ret)
  374 + return ret;
376 375  
377 376 p = pmic_get("FSL_PMIC");
378 377 if (!p)