Skip to content

Commit

Permalink
regulator: Fix display of null constraints for regulators
Browse files Browse the repository at this point in the history
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]>
Cc: [email protected]
Signed-off-by: Liam Girdwood <[email protected]>
  • Loading branch information
broonie authored and Liam Girdwood committed Feb 12, 2010
1 parent 676ad58 commit 973e9a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,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;

Expand Down

0 comments on commit 973e9a2

Please sign in to comment.