Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c456b89a authored by Mark Brown's avatar Mark Brown
Browse files

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: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b787f68c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {