From aed665f7bbacf09121370bc7e21b4cc7d55fc5ef Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Mon, 3 Aug 2009 17:10:06 +0800 Subject: [PATCH] KVM: fix kvm_init() error handling Remove debugfs file if kvm_arch_init() return error Signed-off-by: Xiao Guangrong Signed-off-by: Avi Kivity --- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 646cf2ae32fd..4470251ddc53 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2791,8 +2791,8 @@ int kvm_init(void *opaque, unsigned int vcpu_size, __free_page(bad_page); out: kvm_arch_exit(); - kvm_exit_debug(); out_fail: + kvm_exit_debug(); return r; } EXPORT_SYMBOL_GPL(kvm_init); -- GitLab