linux/drivers/thermal
Srinivas Kandagatla 6b8249abb0 drivers: thermal: qcom: tsens: Fix memory leak from qfprom read
memory returned as part of nvmem_read via qfprom_read should be
freed by the consumer once done.
Existing code is not doing it so fix it.

Below memory leak detected by kmemleak
   [<ffffff80088b7658>] kmemleak_alloc+0x50/0x84
    [<ffffff80081df120>] __kmalloc+0xe8/0x168
    [<ffffff80086db350>] nvmem_cell_read+0x30/0x80
    [<ffffff8008632790>] qfprom_read+0x4c/0x7c
    [<ffffff80086335a4>] calibrate_v1+0x34/0x204
    [<ffffff8008632518>] tsens_probe+0x164/0x258
    [<ffffff80084e0a1c>] platform_drv_probe+0x80/0xa0
    [<ffffff80084de4f4>] really_probe+0x208/0x248
    [<ffffff80084de2c4>] driver_probe_device+0x98/0xc0
    [<ffffff80084dec54>] __device_attach_driver+0x9c/0xac
    [<ffffff80084dca74>] bus_for_each_drv+0x60/0x8c
    [<ffffff80084de634>] __device_attach+0x8c/0x100
    [<ffffff80084de6c8>] device_initial_probe+0x20/0x28
    [<ffffff80084dcbb8>] bus_probe_device+0x34/0x7c
    [<ffffff80084deb08>] deferred_probe_work_func+0x6c/0x98
    [<ffffff80080c3da8>] process_one_work+0x160/0x2f8

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2019-08-28 21:05:08 +08:00
..
broadcom Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
intel int340X/processor_thermal_device: Fix proc_thermal_rapl_remove() 2019-07-23 09:36:07 +02:00
qcom drivers: thermal: qcom: tsens: Fix memory leak from qfprom read 2019-08-28 21:05:08 +08:00
samsung treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
st treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tegra thermal: tegra: Fix a typo 2019-08-28 17:56:45 +08:00
ti-soc-thermal treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
armada_thermal.c thermal: armada: Fix -Wshift-negative-value 2019-08-28 16:41:02 +08:00
clock_cooling.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
cpu_cooling.c thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power 2019-05-14 07:00:41 -07:00
da9062-thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
db8500_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
devfreq_cooling.c trace: thermal: add another parameter 'power' to the tracing function 2017-05-05 15:54:45 +08:00
dove_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
fair_share.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
gov_bang_bang.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
hisi_thermal.c thermal/drivers/hisi: Fix number of sensors on hi3660 2018-12-10 20:13:09 -08:00
imx_thermal.c thermal: imx: save one condition block for normal case of nvmem initialization 2019-01-02 04:47:12 -08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
kirkwood_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
Makefile thermal: Introduce Amazon's Annapurna Labs Thermal Driver 2019-05-14 07:00:26 -07:00
max77620_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
mtk_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
of-thermal.c of: thermal: Improve print information 2019-05-13 20:35:34 -07:00
power_allocator.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
qoriq_thermal.c thermal: qoriq: Remove unnecessary DT node is NULL check 2019-05-14 07:00:27 -07:00
rcar_gen3_thermal.c thermal: rcar_gen3_thermal: Replace devm_add_action() followed by failure action with devm_add_action_or_reset() 2019-08-28 17:51:26 +08:00
rcar_thermal.c thermal: rcar_thermal: update calculation formula for R-Car Gen3 SoCs 2019-05-14 07:00:42 -07:00
rockchip_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
spear_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
step_wise.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
tango_thermal.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
thermal_core.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
thermal_core.h thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
thermal_helpers.c drivers: thermal: Update license to SPDX format 2018-05-30 14:46:17 +08:00
thermal_hwmon.c thermal_hwmon: Pass the originating device down to hwmon_device_register_with_info 2018-07-27 14:43:21 -07:00
thermal_hwmon.h thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set 2019-01-02 04:43:00 -08:00
thermal_mmio.c thermal: Introduce Amazon's Annapurna Labs Thermal Driver 2019-05-14 07:00:26 -07:00
thermal_sysfs.c thermal: Fix locking in cooling device sysfs update cur_state 2018-11-30 16:57:51 +08:00
thermal-generic-adc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
uniphier_thermal.c thermal: uniphier: Convert to SPDX identifier 2019-01-02 04:47:16 -08:00
user_space.c thermal/drivers/core: Use governor table to initialize 2019-06-27 21:22:14 +08:00
zx2967_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00