Commit 4c0b06d8 authored by David Hildenbrand's avatar David Hildenbrand Committed by Radim Krčmář

KVM: x86: remove duplicate checks for ioapic

When handling KVM_GET_IRQCHIP, we already check irqchip_kernel(), which
implies a fully inititalized ioapic.
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 0bceb15a
...@@ -645,8 +645,6 @@ void kvm_ioapic_destroy(struct kvm *kvm) ...@@ -645,8 +645,6 @@ void kvm_ioapic_destroy(struct kvm *kvm)
int kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state) int kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state)
{ {
struct kvm_ioapic *ioapic = kvm->arch.vioapic; struct kvm_ioapic *ioapic = kvm->arch.vioapic;
if (!ioapic)
return -EINVAL;
spin_lock(&ioapic->lock); spin_lock(&ioapic->lock);
memcpy(state, ioapic, sizeof(struct kvm_ioapic_state)); memcpy(state, ioapic, sizeof(struct kvm_ioapic_state));
...@@ -658,8 +656,6 @@ int kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state) ...@@ -658,8 +656,6 @@ int kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state)
int kvm_set_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state) int kvm_set_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state)
{ {
struct kvm_ioapic *ioapic = kvm->arch.vioapic; struct kvm_ioapic *ioapic = kvm->arch.vioapic;
if (!ioapic)
return -EINVAL;
spin_lock(&ioapic->lock); spin_lock(&ioapic->lock);
memcpy(ioapic, state, sizeof(struct kvm_ioapic_state)); memcpy(ioapic, state, sizeof(struct kvm_ioapic_state));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment