linux-yocto/drivers/platform
Srinivas Pandruvada 6e7a2d3881 platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL
commit 685f88c72a upstream.

Address a Smatch static checker warning regarding an unchecked
dereference in the function call:
set_cdie_id(i, cluster_info, plat_info)
when plat_info is NULL.

Instead of addressing this one case, in general if plat_info is NULL
then it can cause other issues. For example in a two package system it
will give warning for duplicate sysfs entry as package ID will be always
zero for both packages when creating string for attribute group name.

plat_info is derived from TPMI ID TPMI_BUS_INFO, which is integral to
the core TPMI design. Therefore, it should not be NULL on a production
platform. Consequently, the module should fail to load if plat_info is
NULL.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/platform-driver-x86/aEKvGCLd1qmX04Tc@stanley.mountain/T/#u
Fixes: 8a54e2253e ("platform/x86/intel-uncore-freq: Uncore frequency control via TPMI")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250606205300.2384494-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:11:38 +01:00
..
arm64
chrome platform/chrome: cros_ec_lpc: Match on Framework ACPI device 2025-04-20 10:15:12 +02:00
cznic
goldfish
loongarch platform/loongarch: laptop: Add backlight power control support 2025-06-27 11:11:37 +01:00
mellanox
mips
olpc
surface
x86 platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL 2025-06-27 11:11:38 +01:00
Kconfig
Makefile