diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-02-18 05:40:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-18 23:24:12 -0500 |
commit | 0b61ad1a7e5a62b771e20401bebfaa062502039c (patch) | |
tree | 6538d95a27c8748383868b64a139e53d10a3aa05 | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
regulator: wm8350: Do not hardcode return value
Propagate the error value returned by the function instead.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index de7b9c73e3fa..7ec7c390eeda 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -361,7 +361,7 @@ static int wm8350_dcdc_set_suspend_voltage(struct regulator_dev *rdev, int uV) | |||
361 | 361 | ||
362 | sel = regulator_map_voltage_linear(rdev, uV, uV); | 362 | sel = regulator_map_voltage_linear(rdev, uV, uV); |
363 | if (sel < 0) | 363 | if (sel < 0) |
364 | return -EINVAL; | 364 | return sel; |
365 | 365 | ||
366 | /* all DCDCs have same mV bits */ | 366 | /* all DCDCs have same mV bits */ |
367 | val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_DC1_VSEL_MASK; | 367 | val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_DC1_VSEL_MASK; |
@@ -574,7 +574,7 @@ static int wm8350_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) | |||
574 | 574 | ||
575 | sel = regulator_map_voltage_linear_range(rdev, uV, uV); | 575 | sel = regulator_map_voltage_linear_range(rdev, uV, uV); |
576 | if (sel < 0) | 576 | if (sel < 0) |
577 | return -EINVAL; | 577 | return sel; |
578 | 578 | ||
579 | /* all LDOs have same mV bits */ | 579 | /* all LDOs have same mV bits */ |
580 | val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_LDO1_VSEL_MASK; | 580 | val = wm8350_reg_read(wm8350, volt_reg) & ~WM8350_LDO1_VSEL_MASK; |