From patchwork Tue Mar 9 06:13:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 84224 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o296CPn1024460 for ; Tue, 9 Mar 2010 06:12:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751385Ab0CIGMR (ORCPT ); Tue, 9 Mar 2010 01:12:17 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:62127 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751243Ab0CIGMR (ORCPT ); Tue, 9 Mar 2010 01:12:17 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 2C61217003F; Tue, 9 Mar 2010 14:12:15 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o296B8fj006866; Tue, 9 Mar 2010 14:11:09 +0800 Received: from [10.167.141.76] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 5DA22D48A5; Tue, 9 Mar 2010 14:14:21 +0800 (CST) Message-ID: <4B95E717.6070806@cn.fujitsu.com> Date: Tue, 09 Mar 2010 14:13:43 +0800 From: Wei Yongjun User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Alexander Graf , kvm@vger.kernel.org Subject: [PATCH] KVM: PPC: Do not create debugfs if fail to create vcpu Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 09 Mar 2010 06:12:25 +0000 (UTC) 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; }