From: Li RongQing The function guest_cpuid_has() is declared with a return type of 'bool'. However, when kvm_find_cpuid_entry_index() fails to locate a valid CPUID entry, the code incorrectly returns 'NULL' instead of 'false'. Signed-off-by: Li RongQing --- arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h index 039b8e6..b0ca723 100644 --- a/arch/x86/kvm/cpuid.h +++ b/arch/x86/kvm/cpuid.h @@ -124,7 +124,7 @@ static __always_inline bool guest_cpuid_has(struct kvm_vcpu *vcpu, entry = kvm_find_cpuid_entry_index(vcpu, cpuid.function, cpuid.index); if (!entry) - return NULL; + return false; reg = __cpuid_entry_get_reg(entry, cpuid.reg); if (!reg) -- 2.9.4