regulator: Fix display of null constraints for regulators

If the regulator constraints are empty and there is no voltage
reported then nothing will be added to the text displayed for the
constraints, leading to random stack data being printed. This is
unlikely to happen for practical regulators since most will at
least report a voltage but should still be fixed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by Mark Brown and committed by Liam Girdwood 973e9a27 676ad585

+1 -1
+1 -1
drivers/regulator/core.c
··· 661 661 static void print_constraints(struct regulator_dev *rdev) 662 662 { 663 663 struct regulation_constraints *constraints = rdev->constraints; 664 - char buf[80]; 664 + char buf[80] = ""; 665 665 int count = 0; 666 666 int ret; 667 667