On Wed, Feb 11, 2015 at 12:09 PM, Peng Fan <peng....@freescale.com> wrote:

> +int power_init_board(void)
> +{
> +       struct pmic *p;
> +       unsigned int ret;
> +
> +       p = pfuze_common_init(I2C_PMIC);
> +       if (!p)
> +               return -ENODEV;
> +
> +       ret = pfuze_mode_init(p, APS_PFM);
> +       if (ret < 0)
> +               return ret;
> +
> +       return 0;

What about doing 'return pfuze_mode_init(p, APS_PFM);' instead?

Then you can get rid of the 'ret' variable and save some lines of code.

Thanks
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to