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>
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index e1aabda..0471955 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -170,7 +170,8 @@
{
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: