mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
PM / Domains: Fix unsafe iteration over modified list of domain providers
of_genpd_del_provider() iterates over list of domain provides and
removes matching element thus it has to use safe version of list
iteration.
Fixes: aa42240ab2 (PM / Domains: Add generic OF-based PM domain look-up)
Cc: 3.19+ <[email protected]> # 3.19+
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
c6e83cac3e
commit
b556b15dc0
1 changed files with 2 additions and 2 deletions
|
|
@ -1835,12 +1835,12 @@ EXPORT_SYMBOL_GPL(of_genpd_add_provider_onecell);
|
|||
*/
|
||||
void of_genpd_del_provider(struct device_node *np)
|
||||
{
|
||||
struct of_genpd_provider *cp;
|
||||
struct of_genpd_provider *cp, *tmp;
|
||||
struct generic_pm_domain *gpd;
|
||||
|
||||
mutex_lock(&gpd_list_lock);
|
||||
mutex_lock(&of_genpd_mutex);
|
||||
list_for_each_entry(cp, &of_genpd_providers, link) {
|
||||
list_for_each_entry_safe(cp, tmp, &of_genpd_providers, link) {
|
||||
if (cp->node == np) {
|
||||
/*
|
||||
* For each PM domain associated with the
|
||||
|
|
|
|||
Loading…
Reference in a new issue