diff options
author | Mark Brown <broonie@kernel.org> | 2019-10-08 19:26:17 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-10-08 19:26:17 +0300 |
commit | 5bf2a9e7d39819cd24e68e79f1d450b292e1a6b3 (patch) | |
tree | f073e06cef3090a577574d13873db36a79f37165 /drivers/regulator/pfuze100-regulator.c | |
parent | 9306a733f8eac86400b9149db6d047dc371e46a2 (diff) | |
parent | 77fd66c9ff3e992718a79fa6407148935d34b50f (diff) | |
download | linux-5bf2a9e7d39819cd24e68e79f1d450b292e1a6b3.tar.xz |
Merge branch 'regulator-5.4' into regulator-5.5
Diffstat (limited to 'drivers/regulator/pfuze100-regulator.c')
-rw-r--r-- | drivers/regulator/pfuze100-regulator.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index df5df1c495ad..689537927f6f 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -788,7 +788,13 @@ static int pfuze100_regulator_probe(struct i2c_client *client, /* SW2~SW4 high bit check and modify the voltage value table */ if (i >= sw_check_start && i <= sw_check_end) { - regmap_read(pfuze_chip->regmap, desc->vsel_reg, &val); + ret = regmap_read(pfuze_chip->regmap, + desc->vsel_reg, &val); + if (ret) { + dev_err(&client->dev, "Fails to read from the register.\n"); + return ret; + } + if (val & sw_hi) { if (pfuze_chip->chip_id == PFUZE3000 || pfuze_chip->chip_id == PFUZE3001) { |