linux-stable/drivers/thermal/intel
Jiasheng Jiang 8ac4620e1f thermal: int340x: Check for NULL after calling kmemdup()
[ Upstream commit 38b16d6cfe ]

As the potential failure of the allocation, kmemdup() may return NULL.

Then, 'bin_attr_data_vault.private' will be NULL, but
'bin_attr_data_vault.size' is not 0, which is not consistent.

Therefore, it is better to check the return value of kmemdup() to
avoid the confusion.

Fixes: 0ba13c763a ("thermal/int340x_thermal: Export GDDV")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 13:57:33 +02:00
..
int340x_thermal thermal: int340x: Check for NULL after calling kmemdup() 2022-04-08 13:57:33 +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_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: pch: Fix unexpected shutdown at critical temperature 2021-01-19 22:30:25 +01:00
intel_powerclamp.c thermal/drivers/intel_powerclamp: Constify static thermal_cooling_device_ops 2021-11-30 15:42:39 +01:00
intel_quark_dts_thermal.c thermal: Rename set_mode() to change_mode() 2020-06-29 20:26:39 +02:00
intel_soc_dts_iosf.c thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit() 2021-07-04 18:28:04 +02: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 drivers/thermal/intel: Add TCC cooling support for AlderLake platform 2021-08-14 12:41:36 +02:00
Kconfig thermal/drivers/intel: Move intel_menlow to thermal drivers 2021-08-17 14:11:48 +02:00
Makefile thermal/drivers/intel: Move intel_menlow to thermal drivers 2021-08-17 14:11:48 +02:00
therm_throt.c thermal/drivers/intel: Allow processing of HWP interrupt 2021-09-09 16:33:20 +02: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/drivers/intel: Initialize RW trip to THERMAL_TEMP_INVALID 2021-05-14 09:37:27 +02:00