Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932868AbcKCVJM (ORCPT ); Thu, 3 Nov 2016 17:09:12 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:37134 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758079AbcKCVJK (ORCPT ); Thu, 3 Nov 2016 17:09:10 -0400 From: Shaohua Li To: CC: , , Subject: [PATCH 1/2] intel_rdt: fix a build warnning Date: Thu, 3 Nov 2016 14:09:05 -0700 Message-ID: X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-FB-Internal: Safe X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-03_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uA3L9Yli017929 Content-Length: 782 Lines: 27 gcc complains: "warning: ‘dentry’ may be used uninitialized in this function" Signed-off-by: Shaohua Li --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index a90ad22..e66c7a5 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -691,8 +691,10 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, closid_init(); ret = rdtgroup_create_info_dir(rdtgroup_default.kn); - if (ret) + if (ret) { + dentry = ERR_PTR(ret); goto out_cdp; + } dentry = kernfs_mount(fs_type, flags, rdt_root, RDTGROUP_SUPER_MAGIC, NULL); -- 2.9.3