regulator: da9063: Do not hardcode return values

Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Sachin Kamat 2014-02-18 16:11:05 +05:30 committed by Mark Brown
parent 2da8215ce2
commit 8a7963d55b
1 changed files with 2 additions and 2 deletions

View File

@ -363,7 +363,7 @@ static int da9063_set_suspend_voltage(struct regulator_dev *rdev, int uV)
sel = regulator_map_voltage_linear(rdev, uV, uV);
if (sel < 0)
return -EINVAL;
return sel;
sel <<= ffs(rdev->desc->vsel_mask) - 1;
@ -755,7 +755,7 @@ static int da9063_regulator_probe(struct platform_device *pdev)
if (ret < 0) {
dev_err(&pdev->dev,
"Error while reading BUCKs configuration\n");
return -EIO;
return ret;
}
bcores_merged = val & DA9063_BCORE_MERGE;
bmem_bio_merged = val & DA9063_BUCK_MERGE;