diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-23 15:28:51 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-04 12:35:23 +0100 |
commit | 798e88b31fbe9863163054feb8432e62e77f539c (patch) | |
tree | d04e816a79233a1fb7320b0d078406ce2484712e /arch/x86/kvm | |
parent | 8f22372f85476bfe612136133d5883b28d163c23 (diff) | |
download | linux-798e88b31fbe9863163054feb8432e62e77f539c.tar.gz linux-798e88b31fbe9863163054feb8432e62e77f539c.tar.bz2 linux-798e88b31fbe9863163054feb8432e62e77f539c.zip |
KVM: MMU: cleanup handle_abnormal_pfn
The goto and temporary variable are unnecessary, just use return
statements.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/mmu.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 42ca0acc1c4e..bb223f8f3440 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2821,20 +2821,16 @@ static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu, static bool handle_abnormal_pfn(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn, kvm_pfn_t pfn, unsigned access, int *ret_val) { - bool ret = true; - /* The pfn is invalid, report the error! */ if (unlikely(is_error_pfn(pfn))) { *ret_val = kvm_handle_bad_page(vcpu, gfn, pfn); - goto exit; + return true; } if (unlikely(is_noslot_pfn(pfn))) vcpu_cache_mmio_info(vcpu, gva, gfn, access); - ret = false; -exit: - return ret; + return false; } static bool page_fault_can_be_fast(u32 error_code) |