projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9992ef4
)
regulator: Ensure val is initialised in 88pm8607 choose_voltage()
author
Mark Brown
<
[email protected]
>
Thu, 22 Oct 2009 15:31:35 +0000
(16:31 +0100)
committer
Liam Girdwood
<
[email protected]
>
Thu, 17 Dec 2009 10:27:25 +0000
(10:27 +0000)
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 <
[email protected]
>
Signed-off-by: Liam Girdwood <
[email protected]
>
drivers/regulator/88pm8607.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/88pm8607.c
b/drivers/regulator/88pm8607.c
index e1aabdaabf2331b6a1e22c16e7643586ac0f8ae9..04719551381b61192dde3fb5594aa20b43b3c5a7 100644
(file)
--- 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: