KVM: x86: prevent uninitialized variable warning in check_svme()
authorRadim Krčmář <[email protected]>
Thu, 18 May 2017 17:37:32 +0000 (19:37 +0200)
committerRadim Krčmář <[email protected]>
Fri, 19 May 2017 17:59:28 +0000 (19:59 +0200)
commit92ceb7679ab8807d3b7fbcc6daf2279036954ef5
treed10ea8fb176db01eb15a7d41778f68d350358c5c
parent34b0dadbdf698f9b277a31b2747b625b9a75ea1f
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 <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
arch/x86/kvm/emulate.c