git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bdcbafa
)
regulator: core: don't crash if set_voltage fails
author
Grazvydas Ignotas
<notasas@gmail.com>
Sun, 22 May 2016 21:44:47 +0000
(
00:44
+0300)
committer
Grazvydas Ignotas
<notasas@gmail.com>
Sun, 3 Jul 2016 00:23:25 +0000
(
03:23
+0300)
it was calling list_voltage() with uninitialized selector
drivers/regulator/core.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index
2dd9838
..
38d0c2c
100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-1745,7
+1745,7
@@
static int _regulator_do_set_voltage(struct regulator_dev *rdev,
ret = rdev->desc->ops->set_voltage(rdev, min_uV, max_uV,
&selector);
- if (rdev->desc->ops->list_voltage)
+ if (r
et >= 0 && r
dev->desc->ops->list_voltage)
selector = rdev->desc->ops->list_voltage(rdev,
selector);
else