regulator: fix unset_regulator_supplies() to remove all matches
authorJani Nikula <ext-jani.1.nikula@nokia.com>
Thu, 29 Apr 2010 07:55:10 +0000 (10:55 +0300)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 25 May 2010 09:16:01 +0000 (10:16 +0100)
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>
drivers/regulator/core.c

index 2a3494f724653760ad0cb372ab33951d3f99d90a..a50672f33afa8f7ea6fb2917b2d870eb42211262 100644 (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;
                }
        }
 }