regulator: fix unset_regulator_supplies() to remove all matches

Remove all matching consumer supplies, not just the first, to not leave
dangling pointers.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Jani Nikula 2010-04-29 10:55:10 +03:00 committed by Liam Girdwood
parent 23b5cc2ab6
commit 47bd53f0e8

View file

@ -1013,7 +1013,6 @@ static void unset_regulator_supplies(struct regulator_dev *rdev)
list_del(&node->list);
kfree(node->dev_name);
kfree(node);
return;
}
}
}