
10 Sep
2014
10 Sep
'14
2:14 p.m.
On Wed, Sep 10, 2014 at 6:08 AM, Ye.Li B37916@freescale.com 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.