All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] kvm tool: Stop init if check_extensions failed
@ 2012-02-10  9:55 Yang Bai
  2012-02-10  9:55 ` [PATCH 2/4] kvm tool: unite the error handle in kvm__init Yang Bai
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yang Bai @ 2012-02-10  9:55 UTC (permalink / raw)
  To: penberg; +Cc: kvm, Yang Bai

If kvm__check_extensions found that some of the required
KVM extention is not supported by OS, we should stop the
init and free all allocated resources.

Signed-off-by: Yang Bai <hamo.by@gmail.com>
---
 tools/kvm/kvm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c
index 9a0bd67..8e749ad 100644
--- a/tools/kvm/kvm.c
+++ b/tools/kvm/kvm.c
@@ -384,6 +384,7 @@ struct kvm *kvm__init(const char *kvm_dev, const char *hugetlbfs_path, u64 ram_s
 	if (kvm__check_extensions(kvm)) {
 		pr_err("A required KVM extention is not supported by OS");
 		ret = -ENOSYS;
+		goto err;
 	}
 
 	kvm__arch_init(kvm, hugetlbfs_path, ram_size);
-- 
1.7.8.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-10 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10  9:55 [PATCH 1/4] kvm tool: Stop init if check_extensions failed Yang Bai
2012-02-10  9:55 ` [PATCH 2/4] kvm tool: unite the error handle in kvm__init Yang Bai
2012-02-10  9:55 ` [PATCH 3/4] kvm tool: if kvm_ipc__start failed, return negative Yang Bai
2012-02-10  9:55 ` [PATCH 4/4] kvm tool: ensure kvm_ipc__register_handler success Yang Bai
2012-02-10 11:38 ` [PATCH 1/4] kvm tool: Stop init if check_extensions failed Pekka Enberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.