projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b787f68
)
regulator: core: Don't corrupt display when printing uV offsets
author
Mark Brown
<broonie@kernel.org>
Tue, 9 Jun 2015 18:54:10 +0000
(19:54 +0100)
committer
Mark Brown
<broonie@kernel.org>
Tue, 9 Jun 2015 18:57:50 +0000
(19:57 +0100)
We weren't taking into account the already used buffer when telling
sprintf() where to print to.
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index
443eaab
..
9afa3af
100644
(file)
--- a/
drivers/regulator/core.c
+++ b/
drivers/regulator/core.c
@@
-801,7
+801,7
@@
static void print_constraints(struct regulator_dev *rdev)
}
if (constraints->uV_offset)
- count += sprintf(buf, "%dmV offset ",
+ count += sprintf(buf
+ count
, "%dmV offset ",
constraints->uV_offset / 1000);
if (constraints->min_uA && constraints->max_uA) {