linux-sg2042/drivers/thermal
Peng Fan 7da6250d29 thermal/of: Fix potential uninitialized value access
[ Upstream commit f96801f0cf ]

If of_parse_phandle_with_args() called from __thermal_of_bind() or
__thermal_of_unbind() fails, cooling_spec.np will not be initialized,
so move the of_node_put() calls below the respective return value checks
to avoid dereferencing an uninitialized pointer.

Fixes: 3fd6d6e2b4 ("thermal/of: Rework the thermal device tree initialization")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:29 +02:00
..
broadcom
intel thermal: intel: BXT_PMIC: select REGMAP instead of depending on it 2023-03-11 13:55:32 +01:00
qcom thermal/drivers/tsens: limit num_sensors to 9 for msm8939 2023-03-10 09:32:54 +01:00
samsung
st
tegra
ti-soc-thermal
Kconfig
Makefile
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c thermal: Validate new state in cur_state_store() 2023-02-01 08:34:26 +01:00
gov_power_allocator.c
gov_step_wise.c
gov_user_space.c
hisi_thermal.c thermal/drivers/hisi: Drop second sensor hi3660 2023-03-10 09:33:05 +01:00
imx8mm_thermal.c thermal/drivers/imx8mm_thermal: Validate temperature range 2022-12-31 13:32:43 +01:00
imx_sc_thermal.c thermal/drivers/imx_sc_thermal: Fix the loop condition 2023-03-10 09:32:55 +01:00
imx_thermal.c
k3_bandgap.c
k3_j72xx_bandgap.c thermal/drivers/k3_j72xx_bandgap: Fix the debug print message 2022-12-31 13:32:43 +01:00
khadas_mcu_fan.c
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe" 2023-07-01 13:16:26 +02:00
qoriq_thermal.c
rcar_gen3_thermal.c
rcar_thermal.c
rockchip_thermal.c
rzg2l_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe() 2023-07-19 16:21:01 +02:00
thermal-generic-adc.c
thermal_core.c thermal: core: call put_device() only after device_register() fails 2023-02-01 08:34:27 +01:00
thermal_core.h
thermal_helpers.c thermal/core: Ensure that thermal device is registered in thermal_zone_get_temp 2022-12-31 13:32:57 +01:00
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c
thermal_netlink.h
thermal_of.c thermal/of: Fix potential uninitialized value access 2023-09-13 09:42:29 +02:00
thermal_sysfs.c thermal: Validate new state in cur_state_store() 2023-02-01 08:34:26 +01:00
uniphier_thermal.c