summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-06-09 21:54:10 +0300
committerMark Brown <broonie@kernel.org>2015-06-09 21:57:50 +0300
commitc456b89a93664d6ff0aba1ced9dd88b88df2505a (patch)
treeb56467726a19cd26193cf497c2a44864771db01d /drivers/regulator
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlinux-c456b89a93664d6ff0aba1ced9dd88b88df2505a.tar.xz
regulator: core: Don't corrupt display when printing uV offsets
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 443eaab933fc..9afa3af78b6a 100644
--- 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) {