linux/drivers/thermal
Jia-Ju Bai f49f00dbe3 thermal: thermal_of: Fix error return code of thermal_of_populate_bind_params()
[ Upstream commit 45c7eaeb29d67224db4ba935deb575586a1fda09 ]

When kcalloc() returns NULL to __tcbp or of_count_phandle_with_args()
returns zero or -ENOENT to count, no error return code of
thermal_of_populate_bind_params() is assigned.
To fix these bugs, ret is assigned with -ENOMEM and -ENOENT in these
cases, respectively.

Fixes: a92bab8919 ("of: thermal: Allow multiple devices to share cooling map")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210310122423.3266-1-baijiaju1990@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:08:24 +02:00
..
broadcom
intel
qcom
samsung
st
tegra
ti-soc-thermal
armada_thermal.c
clock_cooling.c
cpu_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
fair_share.c
gov_bang_bang.c
hisi_thermal.c
imx_thermal.c
Kconfig
kirkwood_thermal.c
Makefile
max77620_thermal.c
mtk_thermal.c
of-thermal.c
power_allocator.c
qoriq_thermal.c
rcar_gen3_thermal.c
rcar_thermal.c
rockchip_thermal.c
spear_thermal.c
step_wise.c
tango_thermal.c
thermal_core.c
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_sysfs.c
thermal-generic-adc.c
uniphier_thermal.c
user_space.c
zx2967_thermal.c