summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-08-24 20:51:24 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-10-12 14:01:51 +0200
commit87ca74ad920ccc8b9fd1c00bd7177070f17ebc95 (patch)
tree14ac236f9b37f67541b2902c1d3c8e736b225218 /arch/x86/kvm/mmu.c
parentbb606a9b802584f753f48b6e3369a3026bf5a824 (diff)
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/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c3
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)