From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Date: Wed, 10 Sep 2014 09:14:54 -0300 Subject: [U-Boot] [PATCH 4/4] imx: mx6: Set Pfuze mode to decrease power number for DSM In-Reply-To: <1410340097-19804-4-git-send-email-B37916@freescale.com> References: <1410340097-19804-1-git-send-email-B37916@freescale.com> <1410340097-19804-4-git-send-email-B37916@freescale.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 10, 2014 at 6:08 AM, Ye.Li wrote: > + value = 0xc; > + if (pmic_reg_write(p, 0x23, value)) { > + printf("Set SW1AB mode error!\n"); > + return -1; > + } -1 is not a proper return code here. You could do this instead: ret = pmic_reg_write(p, 0x23, value) if (ret) { printf("Set SW1AB mode error: %d\n", ret); return ret; } Same applies for other parts.