Messages in this thread Patch in this message | | | From | Stefan Wahren <> | Subject | [PATCH] regulator: core: fix constraints debug output | Date | Wed, 20 May 2015 20:17:09 +0000 |
| |
In the case uV_offset is greater than 0 the debug output before is accidentally overwritten. So take care of the output count.
Fixes: bf5892a8167e ("regulator: Support voltage offsets to compensate for drops") CC: <stable@vger.kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 443eaab..9afa3af 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) { -- 1.7.9.5
| |