From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Thu, 12 Feb 2015 09:38:59 +0800 Subject: [U-Boot] [PATCH v2 3/3] imx:mx6slevk implement power init board In-Reply-To: References: <1423663779-23858-1-git-send-email-Peng.Fan@freescale.com> <1423663779-23858-4-git-send-email-Peng.Fan@freescale.com> Message-ID: <54DC0433.9050703@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Fabio On 2/11/2015 10:13 PM, Fabio Estevam wrote: > On Wed, Feb 11, 2015 at 12:09 PM, Peng Fan 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. This is a good suggestion. I have fixed this and sent out a new v3 version. > > Thanks Thanks Peng.