Skip to content
Commit 05a92622 authored by Sahitya Tummala's avatar Sahitya Tummala Committed by Rafael J. Wysocki
Browse files

PM / core: Fix bug in the error handling of async suspend



If async_suspend is enabled for parent and child devices, then
PM framework has to ensure that parent's async suspend gets called
only after child's async suspend is done. In case if child's async
suspend fails with error, then parent's async suspend must not be
invoked. The current code uses async_error to ensure this but there
is a problem with it in __device_suspend(). This function notifies
the completion of child's async suspend before updating its error
via async_error variable. As a result, parent's async suspend gets
invoked even though it's child suspend has failed. Fix this bug by
updating the async_error before notifying the child's completion.

Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
[ rjw: Rearranged wthitespace ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bed57030
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment