summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/common/block/pmc/pmclib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index cfe8011458..ef4384d395 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -95,9 +95,13 @@ __weak void pmc_soc_restore_power_failure(void)
int acpi_get_sleep_type(void)
{
struct chipset_power_state *ps;
+ int prev_sleep_state = ACPI_S0;
ps = pmc_get_power_state();
- return ps->prev_sleep_state;
+ if (ps)
+ prev_sleep_state = ps->prev_sleep_state;
+
+ return prev_sleep_state;
}
static uint32_t pmc_reset_smi_status(void)