]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: prevent uninitialized variable warning in check_svme()
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 18 May 2017 17:37:32 +0000 (19:37 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 19 May 2017 17:59:28 +0000 (19:59 +0200)
commit4e48e7f1f18a7c6fcacc823214effde1cf7cd7bc
treed10ea8fb176db01eb15a7d41778f68d350358c5c
parentf4ef29aefa8ec990c390a9cdac7d2e962cc3a744
KVM: x86: prevent uninitialized variable warning in check_svme()

get_msr() of MSR_EFER is currently always going to succeed, but static
checker doesn't see that far.

Don't complicate stuff and just use 0 for the fallback -- it means that
the feature is not present.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/emulate.c