Skip to content

Commit

Permalink
regulator: Ensure val is initialised in 88pm8607 choose_voltage()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Dec 17, 2009
1 parent 9992ef4 commit ddec681
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/regulator/88pm8607.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ddec681

Please sign in to comment.