[PATCH] KVM: remove unused code in kvm_coalesced_mmio_init()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: wzt.wzt
Date: Monday, April 12, 2010 - 2:34 am

ret is already set as ENOMEM before, so the second ret = -ENOMEM; can be removed.

Signed-off-by: Zhitong Wang <zhitong.wangzt@alibaba-inc.com>

---
 virt/kvm/coalesced_mmio.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
index 5169736..c0dcfb7 100644
--- a/virt/kvm/coalesced_mmio.c
+++ b/virt/kvm/coalesced_mmio.c
@@ -101,7 +101,6 @@ int kvm_coalesced_mmio_init(struct kvm *kvm)
 		goto out_err;
 	kvm->coalesced_mmio_ring = page_address(page);
 
-	ret = -ENOMEM;
 	dev = kzalloc(sizeof(struct kvm_coalesced_mmio_dev), GFP_KERNEL);
 	if (!dev)
 		goto out_free_page;
-- 
1.6.5.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] KVM: remove unused code in kvm_coalesced_mmio_init(), wzt.wzt, (Mon Apr 12, 2:34 am)