KVM: fix kvm_init() error handling

Remove debugfs file if kvm_arch_init() return error

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Xiao Guangrong 2009-08-03 17:10:06 +08:00 committed by Avi Kivity
parent 1444885a04
commit aed665f7bb

View File

@ -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);