regulator: pv88060: fix error handling in probe

There were some missing "ret = " assignments here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Dan Carpenter 2015-12-01 11:29:12 +03:00 committed by Mark Brown
parent 88467943b3
commit 3c0a2f64bc
1 changed files with 2 additions and 2 deletions

View File

@ -351,14 +351,14 @@ static int pv88060_i2c_probe(struct i2c_client *i2c,
return ret;
}
regmap_write(chip->regmap, PV88060_REG_MASK_B, 0xFF);
ret = regmap_write(chip->regmap, PV88060_REG_MASK_B, 0xFF);
if (ret < 0) {
dev_err(chip->dev,
"Failed to mask B reg: %d\n", ret);
return ret;
}
regmap_write(chip->regmap, PV88060_REG_MASK_C, 0xFF);
ret = regmap_write(chip->regmap, PV88060_REG_MASK_C, 0xFF);
if (ret < 0) {
dev_err(chip->dev,
"Failed to mask C reg: %d\n", ret);