Skip to content

Commit f4fd36b

Browse files
Amit Daniel Kachhapwildea01
authored andcommitted
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 <[email protected]> Signed-off-by: Amit Daniel Kachhap <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 3dec0fe commit f4fd36b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/psci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index)
528528
if (WARN_ON_ONCE(!index))
529529
return -EINVAL;
530530

531-
if (state->type == PSCI_POWER_STATE_TYPE_STANDBY)
531+
if (state[index - 1].type == PSCI_POWER_STATE_TYPE_STANDBY)
532532
ret = psci_ops.cpu_suspend(state[index - 1], 0);
533533
else
534534
ret = __cpu_suspend(index, psci_suspend_finisher);

0 commit comments

Comments
 (0)