Skip to content

Commit

Permalink
Merge branch 'pm-sleep'
Browse files Browse the repository at this point in the history
* pm-sleep:
  PM / Sleep: call early resume handlers when suspend_noirq fails
  • Loading branch information
Rafael J. Wysocki committed Jul 19, 2012
2 parents bd798b7 + 064b021 commit 382e159
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 382e159

Please sign in to comment.