Commit ddec6810 authored by Mark Brown's avatar Mark Brown Committed by Liam Girdwood

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 9992ef40
...@@ -170,7 +170,8 @@ static int choose_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) ...@@ -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); struct pm8607_regulator_info *info = rdev_get_drvdata(rdev);
uint8_t chip_id = info->chip->chip_id; uint8_t chip_id = info->chip->chip_id;
int val, ret; int val = -ENOENT;
int ret;
switch (info->desc.id) { switch (info->desc.id) {
case PM8607_ID_BUCK1: case PM8607_ID_BUCK1:
......
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