PM: Check dpm_suspend_start() return code during partial resume

Bug: 24986869

Change-Id: Iea3e0f84e43827b365b96d34bc647e310523bd40
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Thierry Strudel <tstrudel@google.com>
This commit is contained in:
Dmitry Shmidt 2015-11-03 11:12:43 -08:00 committed by Artem Borisov
parent 0ff10ad812
commit 36f258a110

View file

@ -252,8 +252,14 @@ static bool suspend_again(bool *drivers_resumed)
if (suspend_again_consensus() &&
!freeze_kernel_threads()) {
clear_wakeup_reasons();
dpm_suspend_start(PMSG_SUSPEND);
*drivers_resumed = false;
if (dpm_suspend_start(PMSG_SUSPEND)) {
printk(KERN_ERR "PM: Some devices failed to suspend\n");
log_suspend_abort_reason("Some devices failed to suspend");
if (suspend_ops->recover)
suspend_ops->recover();
return false;
}
return true;
}