diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-09-30 15:56:03 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-10-02 06:22:37 +0200 |
commit | d8fee3666a88a76be7171f9f02425ff73c1eb1d3 (patch) | |
tree | 6d058f8afa32ca89c23ae3f2a8df7ebcadf8e253 /arch/arm/cpu | |
parent | d877a4436bb960e6b942510c3de37b9bd048c1ba (diff) | |
download | barebox-d8fee3666a88a76be7171f9f02425ff73c1eb1d3.tar.gz barebox-d8fee3666a88a76be7171f9f02425ff73c1eb1d3.tar.xz |
ARM: psci: fix NULL pointer dereference on CPU idle
We guard against cpu_off being NULL, but dereference cpu_suspend
instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/psci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c index 436561f864..d1056e0659 100644 --- a/arch/arm/cpu/psci.c +++ b/arch/arm/cpu/psci.c @@ -89,7 +89,7 @@ static unsigned long psci_cpu_suspend(u32 power_state, unsigned long entry, { psci_printf("%s\n", __func__); - if (psci_ops->cpu_off) + if (psci_ops->cpu_suspend) return psci_ops->cpu_suspend(power_state, entry, context_id); return ARM_PSCI_RET_NOT_SUPPORTED; |