Skip to content

Commit

Permalink
KVM: MMU: remove unnecessary check
Browse files Browse the repository at this point in the history
Checking the return of kvm_mmu_get_page is unnecessary since it is
guaranteed by memory cache

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Xiao Guangrong authored and Avi Kivity committed Sep 10, 2012
1 parent 92b5265 commit 7de5bdc
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7de5bdc

Please sign in to comment.