linux/drivers/platform/x86/intel
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>
History 2025-06-27 11:11:38 +01:00
..
atomisp2 platform/x86: intel_atomisp2_led: Also turn off the always-on camera LED on the Asus T100TAF 2022-07-10 19:37:19 +02:00
ifs platform/x86/intel/ifs: Fix SBAF title underline length 2024-08-24 15:00:29 +02:00
int1092 platform/x86: intel: int1092: intel_sar: Convert to platform remove callback returning void 2023-03-07 12:20:31 +01:00
int3472 platform/x86: int3472: Call "reset" GPIO "enable" for INT347E 2025-03-22 12:54:17 -07:00
pmc platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show() 2025-03-22 12:54:15 -07:00
pmt platform/x86/intel/pmt: allow user offset for PMT callbacks 2024-12-05 14:01:35 +01:00
speed_select_if platform/x86: ISST: Correct command storage data length 2025-04-10 14:39:37 +02:00
telemetry platform/x86: intel_telemetry: Switch to new Intel CPU model defines 2024-06-03 09:48:58 +03:00
uncore-frequency platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL 2025-06-27 11:11:38 +01:00
wmi platform/x86: wmi: Do not instantiate older WMI drivers multiple times 2024-03-12 12:47:35 +02:00
bxtwc_tmu.c mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device 2024-12-05 14:02:04 +01:00
bytcrc_pwrsrc.c platform/x86/intel: bytcrc_pwrsrc: Convert to platform remove callback returning void 2023-09-28 13:26:54 +03:00
chtdc_ti_pwrbtn.c platform/x86: intel: chtdc_ti_pwrbtn: Convert to platform remove callback returning void 2023-03-07 12:20:23 +01:00
chtwc_int33fe.c platform/x86: intel: chtwc_int33fe: Use 2-argument strscpy() 2024-06-03 14:51:38 +03:00
crystal_cove_charger.c platform/x86: intel_crystal_cove_charger: Fix IRQ masking / unmasking 2022-01-24 10:41:46 +01:00
hid.c platform/x86/intel: hid: Add Pantherlake support 2025-05-29 11:03:10 +02:00
int0002_vgpio.c platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq() 2024-02-19 12:41:05 +01:00
intel_plr_tpmi.c platform/x86/intel/tpmi/plr: Fix output in plr_print_bits() 2024-07-16 11:42:56 +03:00
ishtp_eclite.c HID: intel-ish-hid: fix module device-id handling 2021-11-11 22:45:40 +01:00
Kconfig platform/x86/intel/tpmi: Add new auxiliary driver for performance limits 2024-05-31 16:32:09 +03:00
Makefile platform/x86/intel/tpmi: Add new auxiliary driver for performance limits 2024-05-31 16:32:09 +03:00
mrfld_pwrbtn.c platform/x86: intel: mrfld_pwrbtn: Convert to platform remove callback returning void 2023-03-07 12:20:35 +01:00
oaktrail.c platform/x86: oaktrail: Use backlight power constants 2024-08-12 16:27:34 +02:00
punit_ipc.c platform/x86: intel: punit_ipc: Drop empty platform remove function 2023-02-02 22:48:20 +01:00
rst.c platform/x86/intel: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:33:16 +02:00
sdsi.c platform/x86/intel/vsec.h: Move to include/linux 2024-08-12 16:21:31 +02:00
smartconnect.c platform/x86/intel: add missing MODULE_DESCRIPTION() macros 2024-06-24 13:33:16 +02:00
tpmi.c platform/x86/intel/vsec.h: Move to include/linux 2024-08-12 16:21:31 +02:00
tpmi_power_domains.c platform/x86/intel: power-domains: Add Clearwater Forest support 2025-01-23 17:22:56 +01:00
tpmi_power_domains.h platform/x86/intel: TPMI domain id and CPU mapping 2024-05-31 16:31:23 +03:00
turbo_max_3.c platform/x86: intel_turbo_max_3: Switch to new Intel CPU model defines 2024-06-03 09:49:05 +03:00
vbtn.c platform/x86: intel-vbtn: Protect ACPI notify handler against recursion 2024-07-30 15:27:57 +03:00
vsec.c platform/x86/intel/vsec: Add Diamond Rapids support 2025-04-10 14:39:29 +02:00