Skip to contentSkip to conversation

KVM: PPC: Do not create debugfs if fail to create vcpu

PATCH Applied Wei Yongjun 3 participants 3 messages Mar 9, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: Do not create debugfs if fail to create vcpu

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

---
 arch/powerpc/kvm/powerpc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/powerpc/kvm/powerpc.c +2 -1
index 5a8eb95..a0e3172 100644
@@ -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;
 }
 
Signature · 1 line
1.6.3.3
Applied
#2 lore raw
In reply to Wei Yongjun
Quoted 3 lines · Wei Yongjun

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

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function