linux/drivers/thermal/intel
Chenyuan Yang 6a810c462f thermal: int340x: Add NULL check for adev
[ Upstream commit 2542a3f70e ]

Not all devices have an ACPI companion fwnode, so adev might be NULL.
This is similar to the commit cd2fd6eab4
("platform/x86: int3472: Check for adev == NULL").

Add a check for adev not being set and return -ENODEV in that case to
avoid a possible NULL pointer deref in int3402_thermal_probe().

Note, under the same directory, int3400_thermal_probe() has such a
check.

Fixes: 77e337c6e2 ("Thermal: introduce INT3402 thermal driver")
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20250313043611.1212116-1-chenyuan0y@gmail.com
[ rjw: Subject edit, added Fixes: ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-04-10 14:33:31 +02:00
..
int340x_thermal thermal: int340x: Add NULL check for adev 2025-04-10 14:33:31 +02:00
intel_bxt_pmic_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
intel_hfi.c thermal: intel: hfi: Add syscore callbacks for system-wide PM 2024-01-31 16:17:09 -08:00
intel_hfi.h thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
intel_menlow.c thermal/drivers/intel: Move intel_menlow to thermal drivers 2021-08-17 14:11:48 +02:00
intel_pch_thermal.c thermal: intel: intel_pch: Add support for Wellsburg PCH 2023-03-10 09:33:50 +01:00
intel_powerclamp.c thermal: intel: powerclamp: Fix cur_state for multi package system 2023-03-10 09:34:22 +01:00
intel_quark_dts_thermal.c thermal: intel: quark_dts: fix error pointer dereference 2023-03-11 13:55:31 +01:00
intel_soc_dts_iosf.c thermal: intel: Fix unsigned comparison with less than zero 2023-03-10 09:33:49 +01:00
intel_soc_dts_iosf.h thermal: intel: intel_soc_dts_iosf: Utilize for_each_set_clump8 macro 2019-12-04 19:44:12 -08:00
intel_soc_dts_thermal.c thermal: Convert to new X86 CPU match macros 2020-03-24 21:33:53 +01:00
intel_tcc_cooling.c thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P 2022-08-03 19:11:38 +02:00
Kconfig thermal: intel: BXT_PMIC: select REGMAP instead of depending on it 2023-03-11 13:55:32 +01:00
Makefile thermal: intel: hfi: Minimally initialize the Hardware Feedback Interface 2022-02-03 19:50:49 +01:00
therm_throt.c thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
thermal_interrupt.h thermal/drivers/intel: Allow processing of HWP interrupt 2021-09-09 16:33:20 +02:00
x86_pkg_temp_thermal.c thermal: intel: x86_pkg_temp_thermal: Drop duplicate 'is' from comment 2022-07-12 20:23:16 +02:00