PM / Domains: Fix unsafe iteration over modified list of device links
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 28 Jun 2017 14:56:18 +0000 (16:56 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 28 Jun 2017 23:24:35 +0000 (01:24 +0200)
commitc6e83cac3eda5f7dd32ee1453df2f7abb5c6cd46
treee218f86ee3210882c0a6f81423af062532ae5c3f
parent8b55e55ee44356d68f4a7ee4b11f9cbb1f5958cc
PM / Domains: Fix unsafe iteration over modified list of device links

pm_genpd_remove_subdomain() iterates over domain's master_links list and
removes matching element thus it has to use safe version of list
iteration.

Fixes: f721889ff65a ("PM / Domains: Support for generic I/O PM domains (v8)")
Cc: 3.1+ <stable@vger.kernel.org> # 3.1+
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>
drivers/base/power/domain.c