regulator: Fix display of null constraints for regulators
commit 973e9a2795 upstream.
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>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a20bc62902
commit
bb0d31fbf2
1 changed files with 1 additions and 1 deletions
|
|
@ -640,7 +640,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;
|
||||
|
||||
if (rdev->desc->type == REGULATOR_VOLTAGE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue