aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepika Bhavnani <deepika.bhavnani@arm.com>2019-08-17 01:10:02 +0300
committerDeepika Bhavnani <deepika.bhavnani@arm.com>2019-09-09 23:16:52 +0300
commit0c411c78842929da7de9005bd1d988950920ac99 (patch)
treea413b7e5b39381a5642b88355a3c960c043e2d77
parent5dbdf8e4eac1d5999f07976f9f430894b0784907 (diff)
downloadtrusted-firmware-a-0c411c78842929da7de9005bd1d988950920ac99.tar.gz
Assert if power level value greater then PSCI_INVALID_PWR_LVL
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: I4a496d5a8e7a9a127cd6224c968539eb74932fca
-rw-r--r--lib/psci/psci_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
index 022c87751..55a0d8722 100644
--- a/lib/psci/psci_common.c
+++ b/lib/psci/psci_common.c
@@ -192,6 +192,7 @@ static unsigned int get_power_on_target_pwrlvl(void)
pwrlvl = psci_get_suspend_pwrlvl();
if (pwrlvl == PSCI_INVALID_PWR_LVL)
pwrlvl = PLAT_MAX_PWR_LVL;
+ assert(pwrlvl < PSCI_INVALID_PWR_LVL);
return pwrlvl;
}