diff options
author | David Hildenbrand <david@redhat.com> | 2017-08-24 21:51:24 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-10-12 15:01:51 +0300 |
commit | 87ca74ad920ccc8b9fd1c00bd7177070f17ebc95 (patch) | |
tree | 14ac236f9b37f67541b2902c1d3c8e736b225218 /arch/x86/kvm | |
parent | bb606a9b802584f753f48b6e3369a3026bf5a824 (diff) | |
download | linux-87ca74ad920ccc8b9fd1c00bd7177070f17ebc95.tar.xz |
KVM: x86: mmu: free_page can handle NULL
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/mmu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 2586c7fd0dea..3b7f94715c57 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4993,8 +4993,7 @@ EXPORT_SYMBOL_GPL(kvm_disable_tdp); static void free_mmu_pages(struct kvm_vcpu *vcpu) { free_page((unsigned long)vcpu->arch.mmu.pae_root); - if (vcpu->arch.mmu.lm_root != NULL) - free_page((unsigned long)vcpu->arch.mmu.lm_root); + free_page((unsigned long)vcpu->arch.mmu.lm_root); } static int alloc_mmu_pages(struct kvm_vcpu *vcpu) |