Commit 47bd53f0 authored by Jani Nikula's avatar Jani Nikula Committed by Liam Girdwood

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: default avatarJani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 23b5cc2a
......@@ -1013,7 +1013,6 @@ static void unset_regulator_supplies(struct regulator_dev *rdev)
list_del(&node->list);
kfree(node->dev_name);
kfree(node);
return;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment