Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp224379rwb; Fri, 4 Aug 2023 11:37:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFicAalKMVxSEhq8RYROrUKm57CfIUT7JBR7vste+/wNn2pTJCQooeutJ2LoWzgDTg2jvgH X-Received: by 2002:a17:90a:2a0a:b0:263:3194:d691 with SMTP id i10-20020a17090a2a0a00b002633194d691mr2579987pjd.45.1691174258807; Fri, 04 Aug 2023 11:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691174258; cv=none; d=google.com; s=arc-20160816; b=0OMBjHnaCsJq6CUbBbNtjhCG54UY4BS041kYto80e6xhXryui1KwHZu4tYyKTs5C2B SwN/bkV4+UU9+1GO+4IKzNridrS5uSGzRS3FMygqL9vIao0S9fBcI0Z4XNKyzs1H8IXH 4tkm1k0sYlvF/uoRlJXc4/GWdzxC1hvQByTlATQgCfL72lIozdFZ0w18+9GFo4KF1fBB HtbdOctLig1VTukzV2b2cZRytmOFi7j24xJTtXyi36N7WbICaXSbYr3k0RGe9VpFEA/g g5zjEmkn/XXaLZ2zJR8V5UVqJrcogff+fYfQXjEJVeXsU5aPd3LWp7HnRdYdm5so9V78 kJ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hfxN3tp4bZy5a4ECN8u+s1HUsSKAaITuj7fzKVcu6qk=; fh=WEpSV3bgp3A1Zl6jKA6zPvHM8YiXzlsfm5hkFFioeA4=; b=J2QEDnKCAoqZlDLACWWMtJ9CkjNqjsCilKnkMx8rlYaQ+j2Q2Le7gvsPRGAlxbDcf+ xqfzNo6J9CuP847XLetif9HcinqaeGys0jBTemumFXhbnQ5SFIP49HqnuwcSk2c8P6LM /XKv8jGWbZ9VOqk5/AMuW/FXFNGbLuu9hDOqLyB2E/M4Z72N9casvvSFrRE4AOirr0nM Onm/QMZ6IUY7U5zNK3FeKgCniLQF3CQbus/uAhhaEdMnnj2/T6bk6FW3qjo9+Tn0zOJt 727ZLyxoB73Mctn8ga18elQptsJ4ZT0eH9hI7IqEMAJAJr5pnfwIAXu6EBRPPoEXUVcK i9RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z43Cs7mv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fa3-20020a17090af0c300b002636ac73ffdsi778843pjb.63.2023.08.04.11.36.38; Fri, 04 Aug 2023 11:37:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z43Cs7mv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231607AbjHDREc (ORCPT + 99 others); Fri, 4 Aug 2023 13:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230407AbjHDREa (ORCPT ); Fri, 4 Aug 2023 13:04:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A54C4C0C for ; Fri, 4 Aug 2023 10:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691168660; x=1722704660; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=r5vvWnhAKMNRDesD6dMnGnajRQ3f1kuJ6oQW1WRN+NE=; b=Z43Cs7mvsttM04SgdrDIthFuV/ja928qiTydXTTh6MmNDZJo7YUQiLyr KNQhNVBbCr+ae1Y2TyDa9YVku/zAEvAjNpMu85Yw5mEKsyWG7eEgIpxV2 d/Gd5iOH9pZz0dsOSj6tp/I4oH0+MJVF/ua9S+HKVT8UjnTrHM1D2PIm9 64c8UYRxLs25vL7mGsUjgMYvpcjqFCa0qZwK/iVTchaRujpWK2MkBVp7a apIHQ6wukAp/mFJHxETyXVC3Hu541Ab2wOFJfq3CwJtbIxOLEnu2Cx+fD Dfe4wZY4m7RL4e9EmbCiTYxpwi/I7Q69P5EXpPOn9nSRZnXRRXY/Cu0Dk g==; X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="373850164" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="373850164" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2023 10:04:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="795481508" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="795481508" Received: from jfdev013vml03.jf.intel.com ([10.165.161.32]) by fmsmga008.fm.intel.com with ESMTP; 04 Aug 2023 10:04:00 -0700 From: alexander.antonov@linux.intel.com To: peterz@infradead.org, linux-kernel@vger.kernel.org Cc: colin.i.king@gmail.com, alexander.antonov@linux.intel.com Subject: [PATCH] perf/x86/intel/uncore: Fix uninitialized variable in skx_upi_topology_cb() Date: Fri, 4 Aug 2023 10:03:54 -0700 Message-Id: <20230804170354.3560038-1-alexander.antonov@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Antonov Fix a potential return of an uninitialized 'ret' variable in skx_upi_topology_cb() function. Fixes: c1c1942b49ea ("perf/x86/intel/uncore: Enable UPI topology discovery for Skylake Server") Reported-by: Colin King Closes: https://lore.kernel.org/lkml/21e2ea66-9524-8e34-a2f0-8e16b9617d68@gmail.com/ Signed-off-by: Alexander Antonov --- arch/x86/events/intel/uncore_snbep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index d49e90dc04a4..d857fc00511b 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c @@ -4330,7 +4330,7 @@ static int upi_fill_topology(struct pci_dev *dev, struct intel_uncore_topology * static int skx_upi_topology_cb(struct intel_uncore_type *type, int segment, int die, u64 cpu_bus_msr) { - int idx, ret; + int idx, ret = -ENODEV; struct intel_uncore_topology *upi; unsigned int devfn; struct pci_dev *dev = NULL; base-commit: c1a515d3c0270628df8ae5f5118ba859b85464a2 -- 2.25.1