mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
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>
This commit is contained in:
parent
b787f68c36
commit
c456b89a93
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue