]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerKamal Mostafa <kamal@canonical.com>
Fri, 10 Jun 2016 13:32:25 +0000 (06:32 -0700)
commit11d0578878fdf699ce124dbc0f7a49404c534935
tree9dac7c4a38c17eea5b7c5c8d8c67e0d7d673af68
parenta408293e8cf03dfc58f61836d8ea2611ea7f3f69
PM / Runtime: Fix error path in pm_runtime_force_resume()

BugLink: http://bugs.launchpad.net/bugs/1590455
commit 0ae3aeefabbeef26294e7a349b51f1c761d46c9f upstream.

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: 37f204164dfb (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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/base/power/runtime.c