From: Xiao Guangrong Date: Fri, 7 Sep 2012 06:15:03 +0000 (+0800) Subject: KVM: MMU: remove unnecessary check X-Git-Tag: v3.7-rc1~113^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7de5bdc96c372ab875408c86e0099958dba89f56;p=platform%2Fupstream%2Fkernel-adaptation-pc.git KVM: MMU: remove unnecessary check Checking the return of kvm_mmu_get_page is unnecessary since it is guaranteed by memory cache Signed-off-by: Xiao Guangrong Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 399c177..aa0b469 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2616,11 +2616,6 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write, sp = kvm_mmu_get_page(vcpu, pseudo_gfn, iterator.addr, iterator.level - 1, 1, ACC_ALL, iterator.sptep); - if (!sp) { - pgprintk("nonpaging_map: ENOMEM\n"); - kvm_release_pfn_clean(pfn); - return -ENOMEM; - } mmu_spte_set(iterator.sptep, __pa(sp->spt)