arm64: psci: fix cpu_suspend to check idle state type for index

This fix rectifies the psci cpu_suspend implementation to check the
PSCI power state parameter type field associated with the requested idle
state index.

Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

authored by Amit Daniel Kachhap and committed by Will Deacon f4fd36b8 3dec0fe4

Changed files
+1 -1
arch
arm64
kernel
+1 -1
arch/arm64/kernel/psci.c
··· 528 528 if (WARN_ON_ONCE(!index)) 529 529 return -EINVAL; 530 530 531 - if (state->type == PSCI_POWER_STATE_TYPE_STANDBY) 531 + if (state[index - 1].type == PSCI_POWER_STATE_TYPE_STANDBY) 532 532 ret = psci_ops.cpu_suspend(state[index - 1], 0); 533 533 else 534 534 ret = __cpu_suspend(index, psci_suspend_finisher);