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>
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
index 22d66bf..b60ddbb 100644
--- a/lib/psci/psci_common.c
+++ b/lib/psci/psci_common.c
@@ -1043,9 +1043,9 @@
 	 * 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);