Skip to content

Commit

Permalink
suspend: Return error when pending wakeup source is found.
Browse files Browse the repository at this point in the history
If a wakeup source is found to be pending in the last stage of suspend
after syscore suspend then the device doesn't suspend but the error is
not propogated which causes an error in the accounting for the number
of suspend aborts and successful suspends.

Change-Id: Ib63b4ead755127eaf03e3b303aab3c782ad02ed1
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
  • Loading branch information
Ruchi Kandoi authored and javilonas committed May 22, 2015
1 parent 75ed7da commit 6f9b981
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/power/suspend.c
Expand Up @@ -216,6 +216,8 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
if (!(suspend_test(TEST_CORE) || *wakeup)) {
error = suspend_ops->enter(state);
events_check_enabled = false;
} else if (*wakeup) {
error = -EBUSY;
}
syscore_resume();
}
Expand Down

0 comments on commit 6f9b981

Please sign in to comment.