diff options
author | David Hildenbrand <david@redhat.com> | 2017-04-07 10:50:26 +0200 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-04-12 20:17:14 +0200 |
commit | 4c0b06d8868b0ad96cca83e0d04687e7f3e5b7bd (patch) | |
tree | 929d1642e66864beed02429a78e93b5f4859e29f /arch/x86/kvm/ioapic.c | |
parent | 0bceb15ad15e9374387688ced76c1ac5f5eb6e14 (diff) | |
download | talos-obmc-linux-4c0b06d8868b0ad96cca83e0d04687e7f3e5b7bd.tar.gz talos-obmc-linux-4c0b06d8868b0ad96cca83e0d04687e7f3e5b7bd.zip |
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: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/ioapic.c')
-rw-r--r-- | arch/x86/kvm/ioapic.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c index da66650e3313..f8e988a14e8d 100644 --- a/arch/x86/kvm/ioapic.c +++ b/arch/x86/kvm/ioapic.c @@ -645,8 +645,6 @@ void kvm_ioapic_destroy(struct kvm *kvm) int kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state) { struct kvm_ioapic *ioapic = kvm->arch.vioapic; - if (!ioapic) - return -EINVAL; spin_lock(&ioapic->lock); memcpy(state, ioapic, sizeof(struct kvm_ioapic_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) { struct kvm_ioapic *ioapic = kvm->arch.vioapic; - if (!ioapic) - return -EINVAL; spin_lock(&ioapic->lock); memcpy(ioapic, state, sizeof(struct kvm_ioapic_state)); |