]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 01:23:37 +0000 (18:23 -0700)
commit9a2a66b526e58a772b34da22af0075157cf9a7e4
tree86c7d0e9608e91cdde6f70233e363510356a7ea7
parentdb68cb368b918d1d6db87ae06929b19dd44f6c14
PM / Runtime: Fix error path in pm_runtime_force_resume()

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>
drivers/base/power/runtime.c