[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432153029-2342-1-git-send-email-stefan.wahren@i2se.com>
Date:	Wed, 20 May 2015 20:17:09 +0000
From:	Stefan Wahren <stefan.wahren@...e.com>
To:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>
Cc:	linux-kernel@...r.kernel.org,
	Stefan Wahren <stefan.wahren@...e.com>,
	<stable@...r.kernel.org>
Subject: [PATCH] regulator: core: fix constraints debug output
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@...r.kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
