regulator: Fix display of null constraints for regulators
PATCH 1/1 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.
---
Not super critical for 2.6.33 but at least worth considering.
drivers/regulator/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/core.c +1 -1
@@ -664,7 +664,7 @@ static int suspend_prepare(struct regulator_dev *rdev, suspend_state_t state)static void print_constraints (struct regulator_dev *rdev) {struct regulation_constraints *constraints = rdev->constraints; -char buf[80 ]; +char buf[80 ] ="" ;int count =0 ;int ret;
Signature · 1 line
1.6.6.1
Liam Girdwood
AppliedQuoted 10 lines · Mark Brown
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 <[email protected]>---
Applied.
Quoted 1 line
Not super critical for 2.6.33 but at least worth considering.
Agreed, I will issue pull request for this for 2.6.33.
Thanks
Liam
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk