x86/cpuidle: replace a pointless NULL check
authorJan Beulich <jbeulich@suse.com>
Thu, 2 Aug 2018 10:12:07 +0000 (12:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 2 Aug 2018 10:12:07 +0000 (12:12 +0200)
commit68465944c81fa2fbc40bf29ec6084072af5e48ec
treec3f904c3746e825f750ab9313ff0f42fd0c45754
parent9e26b58fa71e355d31eedf917e2ef58bdd12a65c
x86/cpuidle: replace a pointless NULL check

The address of an array slot can't be NULL. Instead add a bounds check
to make sure the array indexing is valid (the check is against 2 since
slot zero of the array - corresponding to C0 - is of no interest here).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/acpi/cpu_idle.c