Skip to content

Commit ffbe17c

Browse files
committed
KVM: x86: remove dead initialization
hv_vcpu is initialized again a dozen lines below, and at this point vcpu->arch.hyperv is not valid. Remove the initializer. Reported-by: kernel test robot <[email protected]> Reviewed-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 1383279 commit ffbe17c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/hyperv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc, bool
19331933
void kvm_hv_set_cpuid(struct kvm_vcpu *vcpu)
19341934
{
19351935
struct kvm_cpuid_entry2 *entry;
1936-
struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu);
1936+
struct kvm_vcpu_hv *hv_vcpu;
19371937

19381938
entry = kvm_find_cpuid_entry(vcpu, HYPERV_CPUID_INTERFACE, 0);
19391939
if (entry && entry->eax == HYPERV_CPUID_SIGNATURE_EAX) {

0 commit comments

Comments
 (0)