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 @@ out_free_0:
__free_page(bad_page); __free_page(bad_page);
out: out:
kvm_arch_exit(); kvm_arch_exit();
kvm_exit_debug();
out_fail: out_fail:
kvm_exit_debug();
return r; return r;
} }
EXPORT_SYMBOL_GPL(kvm_init); EXPORT_SYMBOL_GPL(kvm_init);