Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4fd36b8 authored by Amit Daniel Kachhap's avatar Amit Daniel Kachhap Committed by Will Deacon
Browse files

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: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: default avatarAmit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 3dec0fe4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index)
	if (WARN_ON_ONCE(!index))
		return -EINVAL;

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