]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / Domains: Make pm_genpd_poweron() always survive parent removal
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 8 Aug 2011 21:43:22 +0000 (23:43 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 14 Aug 2011 11:35:03 +0000 (13:35 +0200)
commitdc99b5784f3f313f9b284d46f27b96fce4af05dc
tree6b7389d5c4ef938f12d80c7b9a37f99c1f4f9c57
parent12bbf76ab77ebe15467fd5907f5942df4cce8293
PM / Domains: Make pm_genpd_poweron() always survive parent removal

If pm_genpd_remove_subdomain() is called to remove a PM domain's
subdomain and pm_genpd_poweron() is called for that subdomain at
the same time, and the pm_genpd_poweron() called by it recursively
for the parent returns an error, the first pm_genpd_poweron()'s
error code path will attempt to decrement the subdomain counter of
a PM domain that it's not a subdomain of any more.

Rearrange the code in pm_genpd_poweron() to prevent this from
happening.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/domain.c