mirror of
https://github.com/torvalds/linux
synced 2024-09-22 12:26:27 +00:00
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:
parent
23b5cc2ab6
commit
47bd53f0e8
|
@ -1013,7 +1013,6 @@ static void unset_regulator_supplies(struct regulator_dev *rdev)
|
||||||
list_del(&node->list);
|
list_del(&node->list);
|
||||||
kfree(node->dev_name);
|
kfree(node->dev_name);
|
||||||
kfree(node);
|
kfree(node);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue