summaryrefslogtreecommitdiff
path: root/common/psci/psci_main.c
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2013-12-02 16:23:12 +0000
committerDan Handley <dan.handley@arm.com>2013-12-05 12:28:50 +0000
commit3140a9e5c7d524eb1ea1648ae7c26e61fe7d740c (patch)
tree185f44232a24972a0e0f2ff7c560c691161d4582 /common/psci/psci_main.c
parent2d94d4a0bea2c2419efda7fdd821542f6c0bff4b (diff)
psci: rework cpu_off assertion and minor cleanups
This patch: 1. removes a duplicate assertion to check that the only error condition that can be returned while turning a cpu off is PSCI_E_DENIED. Having this assertion after calling psci_afflvl_off() is sufficient. 2. corrects some incorrect usage of 'its' vs 'it is' 3. removes some unwanted white spaces Change-Id: Icf014e269b54f5be5ce0b9fbe6b41258e4ebf403
Diffstat (limited to 'common/psci/psci_main.c')
-rw-r--r--common/psci/psci_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/psci/psci_main.c b/common/psci/psci_main.c
index b1aa8997..fbf864bc 100644
--- a/common/psci/psci_main.c
+++ b/common/psci/psci_main.c
@@ -122,9 +122,11 @@ int psci_cpu_off(void)
*/
rc = psci_afflvl_off(mpidr, target_afflvl, MPIDR_AFFLVL0);
- if (rc != PSCI_E_SUCCESS) {
- assert(rc == PSCI_E_DENIED);
- }
+ /*
+ * The only error cpu_off can return is E_DENIED. So check if that's
+ * indeed the case.
+ */
+ assert (rc == PSCI_E_SUCCESS || rc == PSCI_E_DENIED);
return rc;
}