diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-03-09 14:13:43 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-05 11:16:12 -0700 |
commit | 530015c2b51b4423347fddcb0ed922672bc4e69e (patch) | |
tree | a3b33530b6c83427bf642e2c0499f5e7cf691bb3 | |
parent | 12a6d6c2fcab2cad127529a972425fcc29a78e13 (diff) | |
download | kernel-crypto-530015c2b51b4423347fddcb0ed922672bc4e69e.tar.gz kernel-crypto-530015c2b51b4423347fddcb0ed922672bc4e69e.tar.xz kernel-crypto-530015c2b51b4423347fddcb0ed922672bc4e69e.zip |
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit 06056bfb944a0302a8f22eb45f09123de7fb417b)
-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 f06cf93b178..82098aef09f 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -181,7 +181,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; } |