linux-stable/drivers/thermal
Jiasheng Jiang 9ada174f47 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 14:23:05 +02:00
..
broadcom
intel thermal: int340x: Check for NULL after calling kmemdup() 2022-04-08 14:23:05 +02:00
qcom thermal/drivers/qcom/lmh: make QCOM_LMH depends on QCOM_SCM 2021-11-18 19:16:34 +01:00
samsung thermal/drivers/exynos: Fix an error code in exynos_tmu_probe() 2021-08-14 12:40:35 +02:00
st
tegra thermal/drivers/tegra-soctherm: Silence message about clamped temperature 2021-08-14 15:44:15 +02:00
ti-soc-thermal
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c thermal/drivers/devfreq_cooling: use HZ macros 2021-09-08 11:50:25 -07:00
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c
gov_step_wise.c
gov_user_space.c
hisi_thermal.c
imx8mm_thermal.c thermal/drivers/imx8mm: Enable ADC when enabling monitor 2022-01-27 11:03:23 +01:00
imx_sc_thermal.c
imx_thermal.c thermal/drivers/imx: Implement runtime PM support 2022-01-27 11:03:21 +01:00
k3_bandgap.c
Kconfig
khadas_mcu_fan.c
kirkwood_thermal.c
Makefile
max77620_thermal.c
mtk_thermal.c thermal/drivers/mediatek: Add sensors-support 2021-07-04 18:28:04 +02:00
qoriq_thermal.c
rcar_gen3_thermal.c thermal/drivers/rcar_gen3_thermal: Store TSC id as unsigned int 2021-08-14 12:49:05 +02:00
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c
thermal-generic-adc.c
thermal_core.c thermal: core: Reset previous low and high trip during thermal zone init 2021-12-08 09:04:39 +01:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c thermal: core: Fix TZ_GET_TRIP NULL pointer dereference 2022-03-08 19:12:43 +01:00
thermal_netlink.h
thermal_of.c thermal: Fix NULL pointer dereferences in of_thermal_ functions 2021-11-21 13:44:14 +01:00
thermal_sysfs.c
uniphier_thermal.c