linux-stable/drivers/thermal
Yang Yingliang c4c435d363 thermal: core: fix some possible name leaks in error paths
[ Upstream commit 4748f9687c ]

In some error paths before device_register(), the names allocated
by dev_set_name() are not freed. Move dev_set_name() front to
device_register(), so the name can be freed while calling
put_device().

Fixes: 1dd7128b83 ("thermal/core: Fix null pointer dereference in thermal_release()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:25:44 +01:00
..
broadcom
intel thermal: intel_powerclamp: Use first online CPU as control_cpu 2022-10-26 12:22:55 +02:00
qcom thermal/drivers/qcom/tsens-v0_1: Fix MSM8939 fourth sensor hw_id 2022-10-21 12:39:01 +02:00
samsung
st
tegra thermal/core: Rename 'trips' to 'num_trips' 2022-07-28 17:29:56 +02:00
ti-soc-thermal thermal/ti-soc-thermal: Fix comment typo 2022-07-28 17:29:51 +02:00
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c thermal: cpufreq_cooling: Check the policy first in cpufreq_cooling_register() 2022-10-21 12:37:59 +02:00
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c thermal/drivers/u8500: Remove unnecessary print function dev_err() 2022-07-28 17:29:50 +02:00
devfreq_cooling.c Thermal control updates for 5.20-rc1 2022-08-02 11:27:53 -07:00
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c thermal/core: Rename 'trips' to 'num_trips' 2022-07-28 17:29:56 +02:00
gov_power_allocator.c thermal/core: Rename 'trips' to 'num_trips' 2022-07-28 17:29:56 +02:00
gov_step_wise.c thermal/core: Remove DROP_FULL and RAISE_FULL 2022-07-28 17:29:47 +02:00
gov_user_space.c
hisi_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
imx8mm_thermal.c
imx_sc_thermal.c
imx_thermal.c
k3_bandgap.c
k3_j72xx_bandgap.c thermal/drivers/k3_j72xx_bandgap: Make k3_j72xx_bandgap_j721e_data and k3_j72xx_bandgap_j7200_data static 2022-07-28 17:29:48 +02:00
Kconfig thermal: Drop obsolete dependency on COMPILE_TEST 2022-08-03 19:15:31 +02:00
khadas_mcu_fan.c
kirkwood_thermal.c
Makefile
max77620_thermal.c
mtk_thermal.c
qoriq_thermal.c
rcar_gen3_thermal.c Thermal control updates for 5.20-rc1 2022-08-02 11:27:53 -07:00
rcar_thermal.c
rockchip_thermal.c
rzg2l_thermal.c thermal/drivers/rzg2l: Fix comments 2022-07-28 17:29:49 +02:00
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c thermal/drivers/sun8i: Fix typo in comment 2022-07-28 17:29:49 +02:00
thermal-generic-adc.c
thermal_core.c thermal: core: fix some possible name leaks in error paths 2022-12-31 13:25:44 +01:00
thermal_core.h thermal/core: Move thermal_set_delay_jiffies to static 2022-07-28 17:29:55 +02:00
thermal_helpers.c thermal/core: Rename 'trips' to 'num_trips' 2022-07-28 17:29:56 +02:00
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c thermal/core: Rename 'trips' to 'num_trips' 2022-07-28 17:29:56 +02:00
thermal_netlink.h
thermal_of.c thermal/of: Initialize trip points separately 2022-07-28 17:29:57 +02:00
thermal_sysfs.c thermal: sysfs: Fix cooling_device_stats_setup() error code path 2022-08-03 19:14:26 +02:00
uniphier_thermal.c