Skip to contentSkip to conversation

regulator: core: Don't corrupt display when printing uV offsets

PATCH New Mark Brown 1 participant 1 message Jun 9, 2015 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/core.c +1 -1
index f6989485c382..5ec894e9f3e4 100644
@@ -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) {
Signature · 1 line
2.1.4