KVM: fix kvm_init() error handling
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Mon, 3 Aug 2009 09:10:06 +0000 (17:10 +0800)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:33:17 +0000 (08:33 +0300)
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>
virt/kvm/kvm_main.c

index 646cf2a..4470251 100644 (file)
@@ -2791,8 +2791,8 @@ out_free_0:
        __free_page(bad_page);
 out:
        kvm_arch_exit();
-       kvm_exit_debug();
 out_fail:
+       kvm_exit_debug();
        return r;
 }
 EXPORT_SYMBOL_GPL(kvm_init);