diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-02-18 05:41:05 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-19 11:31:47 -0500 |
commit | 8a7963d55b58aa95f45928dec229380c28d921ed (patch) | |
tree | d01592163e7e89db1302799f59ccd7210c891718 /drivers/regulator/da9063-regulator.c | |
parent | 2da8215ce2ca123d9d6a33e4fda3cd154192acc8 (diff) |
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>
Diffstat (limited to 'drivers/regulator/da9063-regulator.c')
-rw-r--r-- | drivers/regulator/da9063-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index f5d1ca9ab7dd..3c65644f3007 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c | |||
@@ -363,7 +363,7 @@ static int da9063_set_suspend_voltage(struct regulator_dev *rdev, int uV) | |||
363 | 363 | ||
364 | sel = regulator_map_voltage_linear(rdev, uV, uV); | 364 | sel = regulator_map_voltage_linear(rdev, uV, uV); |
365 | if (sel < 0) | 365 | if (sel < 0) |
366 | return -EINVAL; | 366 | return sel; |
367 | 367 | ||
368 | sel <<= ffs(rdev->desc->vsel_mask) - 1; | 368 | sel <<= ffs(rdev->desc->vsel_mask) - 1; |
369 | 369 | ||
@@ -755,7 +755,7 @@ static int da9063_regulator_probe(struct platform_device *pdev) | |||
755 | if (ret < 0) { | 755 | if (ret < 0) { |
756 | dev_err(&pdev->dev, | 756 | dev_err(&pdev->dev, |
757 | "Error while reading BUCKs configuration\n"); | 757 | "Error while reading BUCKs configuration\n"); |
758 | return -EIO; | 758 | return ret; |
759 | } | 759 | } |
760 | bcores_merged = val & DA9063_BCORE_MERGE; | 760 | bcores_merged = val & DA9063_BCORE_MERGE; |
761 | bmem_bio_merged = val & DA9063_BUCK_MERGE; | 761 | bmem_bio_merged = val & DA9063_BUCK_MERGE; |