]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Runtime: Fix error path in pm_runtime_force_resume()
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 8 Apr 2016 11:10:23 +0000 (13:10 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 Apr 2016 17:31:11 +0000 (19:31 +0200)
commit4622476c7bdbbcad2b48b2920d20aaa279439f08
tree0aa249f1af5a84c84d0c555a1b140c609cb01cfb
parentc37d773c7d162e62832df04ed30fa86b91b50305
PM / Runtime: Fix error path in pm_runtime_force_resume()

As pm_runtime_set_active() may fail because the device's parent isn't
active, we can end up executing the ->runtime_resume() callback for the
device when it isn't allowed.

Fix this by invoking pm_runtime_set_active() before running the callback
and let's also deal with the error code.

Fixes: 895ef9d506e3 (PM: Add pm_runtime_suspend|resume_force functions)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/runtime.c