aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/88pm8607.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-10-22 16:31:35 +0100
committerLiam Girdwood <lrg@slimlogic.co.uk>2009-12-17 10:27:25 +0000
commitddec68107ab101d9ff934811d5598f5c613027f2 (patch)
treea0e561eee13ea0001100180c7859043334676b11 /drivers/regulator/88pm8607.c
parentregulator: Remove duplicate consts from ab3100 (diff)
downloadlinux-dev-ddec68107ab101d9ff934811d5598f5c613027f2.tar.xz
linux-dev-ddec68107ab101d9ff934811d5598f5c613027f2.zip
regulator: Ensure val is initialised in 88pm8607 choose_voltage()
If we fall through it means that we hit an unknown regulator/chip combination so set -ENOENT as an explicit flag (the return code is only used internally). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/88pm8607.c')
-rw-r--r--drivers/regulator/88pm8607.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index e1aabdaabf23..04719551381b 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -170,7 +170,8 @@ static int choose_voltage(struct regulator_dev *rdev, int min_uV, int max_uV)
{
struct pm8607_regulator_info *info = rdev_get_drvdata(rdev);
uint8_t chip_id = info->chip->chip_id;
- int val, ret;
+ int val = -ENOENT;
+ int ret;
switch (info->desc.id) {
case PM8607_ID_BUCK1: