Commit 8a7963d5 authored by Sachin Kamat's avatar Sachin Kamat Committed by Mark Brown

regulator: da9063: Do not hardcode return values

Propagate the error values returned by the function instead.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 2da8215c
...@@ -363,7 +363,7 @@ static int da9063_set_suspend_voltage(struct regulator_dev *rdev, int uV) ...@@ -363,7 +363,7 @@ static int da9063_set_suspend_voltage(struct regulator_dev *rdev, int uV)
sel = regulator_map_voltage_linear(rdev, uV, uV); sel = regulator_map_voltage_linear(rdev, uV, uV);
if (sel < 0) if (sel < 0)
return -EINVAL; return sel;
sel <<= ffs(rdev->desc->vsel_mask) - 1; sel <<= ffs(rdev->desc->vsel_mask) - 1;
...@@ -755,7 +755,7 @@ static int da9063_regulator_probe(struct platform_device *pdev) ...@@ -755,7 +755,7 @@ static int da9063_regulator_probe(struct platform_device *pdev)
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Error while reading BUCKs configuration\n"); "Error while reading BUCKs configuration\n");
return -EIO; return ret;
} }
bcores_merged = val & DA9063_BCORE_MERGE; bcores_merged = val & DA9063_BCORE_MERGE;
bmem_bio_merged = val & DA9063_BUCK_MERGE; bmem_bio_merged = val & DA9063_BUCK_MERGE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment