projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea30994
)
PM / Runtime: Fix error path for prepare
author
Ulf Hansson
<ulf.hansson@linaro.org>
Wed, 13 Nov 2013 14:45:03 +0000
(15:45 +0100)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Wed, 13 Nov 2013 23:48:19 +0000
(
00:48
+0100)
If a device prepare callback for some reason would fail, the PM core
prevented the device from going inactive forever.
In this case, to reverse the pm_runtime_get_noresume() we invokes the
asyncronous pm_runtime_put(), thus restoring the usage count.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/main.c
patch
|
blob
|
history
diff --git
a/drivers/base/power/main.c
b/drivers/base/power/main.c
index
9f098a8
..
97db755
100644
(file)
--- a/
drivers/base/power/main.c
+++ b/
drivers/base/power/main.c
@@
-1277,6
+1277,9
@@
static int device_prepare(struct device *dev, pm_message_t state)
device_unlock(dev);
+ if (error)
+ pm_runtime_put(dev);
+
return error;
}