Skip to content
Commit e2058a95 authored by Flavio Ceolin's avatar Flavio Ceolin Committed by David Leach
Browse files

pm: Fix a corner case when policy returns NULL



When the policy returns NULL pm_system_suspend was assuming that
the current state in z_cpus_pm_state was ACTIVE, since that is the
state set after the core wakes and return to this function. The
problem is that in cases where the cpu does not preserve the context,
and returns to this function, z_cpus_pm_state has the value of the
last state used and the cpu use it again.

Fix it setting z_cpus_pm_state to ACTIVE every time the policy returns
NULL.

Signed-off-by: default avatarFlavio Ceolin <flavio.ceolin@intel.com>
parent 370c977b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment