fix(psci): fix MISRA failure - Memory - illegal accesses

Fixed below MISRA failure -
>>>     CID 379362:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array "psci_non_cpu_pd_nodes" of 5 16-byte
>>>     elements at element index 5 (byte offset 95) using index
>>>     "i" (which evaluates to 5).

Change-Id: Ie88fc555e48b06563372bfe4e51f16b13c0a020b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
Manish V Badarkhe 2022-07-22 12:21:16 +01:00 committed by Manish V Badarkhe
parent 3f9d5c24cf
commit 0551aac563

View file

@ -1043,9 +1043,9 @@ bool psci_is_last_on_cpu_safe(void)
* Traverse the forest of PSCI nodes, nodes with no parents
* (invalid-nodes) are the root nodes.
*/
while ((psci_non_cpu_pd_nodes[i].parent_node ==
PSCI_PARENT_NODE_INVALID) &&
(i < PSCI_NUM_NON_CPU_PWR_DOMAINS)) {
while ((i < PSCI_NUM_NON_CPU_PWR_DOMAINS) &&
(psci_non_cpu_pd_nodes[i].parent_node ==
PSCI_PARENT_NODE_INVALID)) {
psci_get_parent_pwr_domain_nodes(
psci_non_cpu_pd_nodes[i].cpu_start_idx,
PLAT_MAX_PWR_LVL, parent_nodes);