fix(xilinx): resolve misra rule 15.7 violations
Fixed below MISRA violation:
- MISRA Violation: MISRA-C:2012 R.15.7:
- All if...else if constructs shall be terminated with an else statement.
- Fix:
- Convert the final else if into an else statement to comply with
MISRA guidelines
Change-Id: I1f54d955958538529a10f146a506ce2a3474f8d7
Signed-off-by: Devanshi Chauhan Alpeshbhai <devanshi.chauhanalpeshbhai@amd.com>
diff --git a/plat/xilinx/common/pm_service/pm_svc_main.c b/plat/xilinx/common/pm_service/pm_svc_main.c
index bc8e251..58f697f 100644
--- a/plat/xilinx/common/pm_service/pm_svc_main.c
+++ b/plat/xilinx/common/pm_service/pm_svc_main.c
@@ -182,9 +182,11 @@
}
}
notify_os();
- } else if (payload[2] == EVENT_CPU_PWRDWN) {
- request_cpu_pwrdwn();
- (void)psci_cpu_off();
+ } else {
+ if (payload[2] == EVENT_CPU_PWRDWN) {
+ request_cpu_pwrdwn();
+ (void)psci_cpu_off();
+ }
}
break;
case (uint32_t)PM_RET_ERROR_INVALID_CRC: