public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Do not create debugfs if fail to create vcpu
@ 2010-03-09  6:13 Wei Yongjun
  2010-03-09 10:57 ` Alexander Graf
  2010-03-09 12:43 ` Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2010-03-09  6:13 UTC (permalink / raw)
  To: Alexander Graf, kvm

If fail to create the vcpu, we should not create the debugfs
for it.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 arch/powerpc/kvm/powerpc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 5a8eb95..a0e3172 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -193,7 +193,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
 {
 	struct kvm_vcpu *vcpu;
 	vcpu = kvmppc_core_vcpu_create(kvm, id);
-	kvmppc_create_vcpu_debugfs(vcpu, id);
+	if (!IS_ERR(vcpu))
+		kvmppc_create_vcpu_debugfs(vcpu, id);
 	return vcpu;
 }
 
-- 
1.6.3.3



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

end of thread, other threads:[~2010-03-09 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09  6:13 [PATCH] KVM: PPC: Do not create debugfs if fail to create vcpu Wei Yongjun
2010-03-09 10:57 ` Alexander Graf
2010-03-09 12:43 ` Avi Kivity

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