diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-03-09 01:13:43 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:15:21 -0400 |
commit | 06056bfb944a0302a8f22eb45f09123de7fb417b (patch) | |
tree | 72868a18843f5fcdbb3d933f96f2ca69bc385dc8 /arch/powerpc/kvm/powerpc.c | |
parent | 7b06bf2ffa15e119c7439ed0b024d44f66d7b605 (diff) |
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.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Alexander Graf <agraf@suse.de>
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r-- | 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 ace31ca0524..3f8677e9d8f 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -194,7 +194,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) | |||
194 | { | 194 | { |
195 | struct kvm_vcpu *vcpu; | 195 | struct kvm_vcpu *vcpu; |
196 | vcpu = kvmppc_core_vcpu_create(kvm, id); | 196 | vcpu = kvmppc_core_vcpu_create(kvm, id); |
197 | kvmppc_create_vcpu_debugfs(vcpu, id); | 197 | if (!IS_ERR(vcpu)) |
198 | kvmppc_create_vcpu_debugfs(vcpu, id); | ||
198 | return vcpu; | 199 | return vcpu; |
199 | } | 200 | } |
200 | 201 | ||