Skip to content

Commit

Permalink
KVM: add missing misc_deregister() on error in kvm_init()
Browse files Browse the repository at this point in the history
Add the missing misc_deregister() before return from kvm_init()
in the debugfs init error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
  • Loading branch information
Wei Yongjun authored and Gleb Natapov committed May 12, 2013
1 parent f722406 commit afc2f79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,

out_undebugfs:
unregister_syscore_ops(&kvm_syscore_ops);
misc_deregister(&kvm_dev);
out_unreg:
kvm_async_pf_deinit();
out_free:
Expand Down

0 comments on commit afc2f79

Please sign in to comment.