perf/x86/intel/uncore: Fix uninitialized variable in skx_upi_topology_cb()
Subsystems (2)
PATCH 1/1 perf/x86/intel/uncore: Fix uninitialized variable in skx_upi_topology_cb()
From: Alexander Antonov <[email protected]>
Fix the following warning in recently merged patch:
Quoted 5 lines
config: x86_64-randconfig-m001
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0smatch warnings:
arch/x86/events/intel/uncore_snbep.c:4345skx_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 <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Alexander Antonov <[email protected]>
--- arch/x86/events/intel/uncore_snbep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/uncore_snbep.c +1 -1
@@ -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
Signature · 1 line
2.25.1