Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06056bfb authored by Wei Yongjun's avatar Wei Yongjun Committed by Avi Kivity
Browse files

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: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: default avatarAlexander Graf <agraf@suse.de>
Cc: stable@kernel.org
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 7b06bf2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
{
	struct kvm_vcpu *vcpu;
	vcpu = kvmppc_core_vcpu_create(kvm, id);
	if (!IS_ERR(vcpu))
		kvmppc_create_vcpu_debugfs(vcpu, id);
	return vcpu;
}