]> 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>
Mon, 8 Aug 2011 21:43:22 +0000 (23:43 +0200)
commitba598be6d46f54f800885be7411f837808c3cb41
tree0828f10e29243522ea972b377297a0c38a7fc62c
parentb3883109f73a2c9c6974328089fdbdce0d2d1034
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