public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: add missing misc_deregister() on error in kvm_init()
@ 2013-05-05 12:03 Wei Yongjun
  2013-05-12  9:06 ` Gleb Natapov
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-05 12:03 UTC (permalink / raw)
  To: mtosatti, gleb; +Cc: yongjun_wei, kvm

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 virt/kvm/kvm_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f18013f..3eb4d16 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3012,6 +3012,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:


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-12  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 12:03 [PATCH] KVM: add missing misc_deregister() on error in kvm_init() Wei Yongjun
2013-05-12  9:06 ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox