PM / Domains: Fix unsafe iteration over modified list of domains
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 28 Jun 2017 14:56:20 +0000 (16:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:07:59 +0000 (15:07 -0700)
commitd2bb0af4463d0fd094385d8e15f8f18c9adaafa4
tree7c5cfbd07d8eb8fbb7fe21bd9bd84debf00f63a6
parent178aa241fc070e5b34c5bbe3f9ae0a6b0b335840
PM / Domains: Fix unsafe iteration over modified list of domains

commit a7e2d1bce4c1db471f1cbc0c4666a3112bbf0994 upstream.

of_genpd_remove_last() iterates over list of domains and removes
matching element thus it has to use safe version of list iteration.

Fixes: 17926551c98a (PM / Domains: Add support for removing nested PM domains by provider)
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/power/domain.c