Commit ecaef469 authored by Pierre Gondois's avatar Pierre Gondois Committed by Greg Kroah-Hartman

cacheinfo: Initialize variables in fetch_cache_info()

Set potentially uninitialized variables to 0. This is particularly
relevant when CONFIG_ACPI_PPTT is not set.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/all/202301052307.JYt1GWaJ-lkp@intel.com/Reported-by: default avatarDan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/all/Y86iruJPuwNN7rZw@kili/
Fixes: 5944ce09 ("arch_topology: Build cacheinfo from primary CPU")
Signed-off-by: default avatarPierre Gondois <pierre.gondois@arm.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230124154053.355376-2-pierre.gondois@arm.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2b8e3533
...@@ -424,7 +424,7 @@ int allocate_cache_info(int cpu) ...@@ -424,7 +424,7 @@ int allocate_cache_info(int cpu)
int fetch_cache_info(unsigned int cpu) int fetch_cache_info(unsigned int cpu)
{ {
struct cpu_cacheinfo *this_cpu_ci; struct cpu_cacheinfo *this_cpu_ci;
unsigned int levels, split_levels; unsigned int levels = 0, split_levels = 0;
int ret; int ret;
if (acpi_disabled) { if (acpi_disabled) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment