summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-07-19 10:39:21 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-19 10:39:21 +0200
commit382e1596197be46b73aed08be05acf5b5ae8ce49 (patch)
treec0e886e45c1513710ac20c2cd945e5bc41fe8b90 /drivers/base
parentMerge branch 'pm-qos' (diff)
parentPM / Sleep: call early resume handlers when suspend_noirq fails (diff)
downloadlinux-382e1596197be46b73aed08be05acf5b5ae8ce49.tar.xz
linux-382e1596197be46b73aed08be05acf5b5ae8ce49.zip
Merge branch 'pm-sleep'
* pm-sleep: PM / Sleep: call early resume handlers when suspend_noirq fails
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 61a891dda380..0113adc310dc 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -991,8 +991,16 @@ static int dpm_suspend_late(pm_message_t state)
int dpm_suspend_end(pm_message_t state)
{
int error = dpm_suspend_late(state);
+ if (error)
+ return error;
- return error ? : dpm_suspend_noirq(state);
+ error = dpm_suspend_noirq(state);
+ if (error) {
+ dpm_resume_early(state);
+ return error;
+ }
+
+ return 0;
}
EXPORT_SYMBOL_GPL(dpm_suspend_end);