Skip to content

Commit

Permalink
KVM: MMIO: get rid of odd out_err label in kvm_coalesced_mmio_init
Browse files Browse the repository at this point in the history
The out_err label and var ret is unnecessary, clean them up.

Signed-off-by: Miaohe Lin <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
MiaoheLin authored and bonzini committed Nov 15, 2019
1 parent e64a850 commit b139b5a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions virt/kvm/coalesced_mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,11 @@ static const struct kvm_io_device_ops coalesced_mmio_ops = {
int kvm_coalesced_mmio_init(struct kvm *kvm)
{
struct page *page;
int ret;

ret = -ENOMEM;
page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (!page)
goto out_err;
return -ENOMEM;

ret = 0;
kvm->coalesced_mmio_ring = page_address(page);

/*
Expand All @@ -128,8 +125,7 @@ int kvm_coalesced_mmio_init(struct kvm *kvm)
spin_lock_init(&kvm->ring_lock);
INIT_LIST_HEAD(&kvm->coalesced_zones);

out_err:
return ret;
return 0;
}

void kvm_coalesced_mmio_free(struct kvm *kvm)
Expand Down

0 comments on commit b139b5a

Please sign in to comment.