mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Check return of regulator_enable
Check return of regulator_enable to avoid compile issue for in some build environment. Change-Id: I49e64662959c2f5e57909901ae3c373ae57b3e08 Signed-off-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/2273786 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
81067e6616
commit
e9dcdc46e0
1 changed files with 3 additions and 2 deletions
|
|
@ -1024,9 +1024,10 @@ static int cw2217_probe(struct i2c_client *client, const struct i2c_device_id *i
|
|||
if (IS_ERR_OR_NULL(cw_bat->vdd_i2c_vreg)) {
|
||||
printk("%s: Could not get vdd-i2c power regulator\n", __func__);
|
||||
cw_bat->vdd_i2c_vreg = NULL;
|
||||
ret = 0;
|
||||
} else {
|
||||
regulator_enable(cw_bat->vdd_i2c_vreg);
|
||||
ret = regulator_enable(cw_bat->vdd_i2c_vreg);
|
||||
printk("%s: Enable vdd-i2c, ret=%d\n", __func__, ret);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
ret = cw_get_chip_id(cw_bat);
|
||||
|
|
|
|||
Loading…
Reference in a new issue