From: alexander.antonov@linux.intel.com
To: peterz@infradead.org, linux-kernel@vger.kernel.org
Cc: kan.liang@linux.intel.com, alexey.v.bayduraev@linux.intel.com,
alexander.antonov@linux.intel.com
Subject: [PATCH] perf/x86/intel/uncore: Fix uninitialized variable in skx_upi_topology_cb()
Date: Mon, 28 Nov 2022 15:11:34 +0000 [thread overview]
Message-ID: <20221128151134.3370671-1-alexander.antonov@linux.intel.com> (raw)
From: Alexander Antonov <alexander.antonov@linux.intel.com>
Fix the following warning in recently merged patch:
> config: x86_64-randconfig-m001
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
>
> smatch warnings:
> arch/x86/events/intel/uncore_snbep.c:4345 skx_upi_topology_cb() error: uninitialized symbol 'ret'.
Fixes: c1c1942b49ea ("perf/x86/intel/uncore: Enable UPI topology discovery for Skylake Server")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alexander Antonov <alexander.antonov@linux.intel.com>
---
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 44c2f879f708..db6586e12bcb 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -4340,7 +4340,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: 415db869ef56751c4ab72f0f58cd7224213bb357
--
2.25.1
next reply other threads:[~2022-11-28 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 15:11 alexander.antonov [this message]
2023-08-04 17:03 [PATCH] perf/x86/intel/uncore: Fix uninitialized variable in skx_upi_topology_cb() alexander.antonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221128151134.3370671-1-alexander.antonov@linux.intel.com \
--to=alexander.antonov@linux.intel.com \
--cc=alexey.v.bayduraev@linux.intel.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).