linux-hardened/drivers/devfreq
Chanwoo Choi 9e14de1077 PM / devfreq: Fix memory leak when fail to register device
When the devfreq_add_device fails to register deivce, the memory
leak of devfreq instance happen. So, this patch fix the memory
leak issue. Before freeing the devfreq instance checks whether
devfreq instance is NULL or not because the device_unregister()
frees the devfreq instance when jumping to the 'err_init'.
It is to prevent the duplicate the kfee(devfreq).

Cc: stable@vger.kernel.org
Fixes: ac4b281176 ("PM / devfreq: fix duplicated kfree on devfreq pointer")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2017-08-28 10:31:08 +09:00
..
event PM / devfreq: exynos-ppmu: Staticize event list 2017-06-12 10:12:07 +09:00
devfreq-event.c PM / devfreq: Convert to using %pOF instead of full_name 2017-08-28 09:15:33 +09:00
devfreq.c PM / devfreq: Fix memory leak when fail to register device 2017-08-28 10:31:08 +09:00
exynos-bus.c Merge branch 'pm-devfreq' 2017-02-20 14:23:40 +01:00
governor.h PM / devfreq: Move private devfreq_update_stats() into devfreq 2017-08-28 10:22:27 +09:00
governor_passive.c Merge branch 'pm-devfreq' 2017-02-20 14:23:40 +01:00
governor_performance.c PM / devfreq: governors: add GPL module license and allow module build 2012-11-20 18:46:23 +09:00
governor_powersave.c PM / devfreq: governors: add GPL module license and allow module build 2012-11-20 18:46:23 +09:00
governor_simpleondemand.c PM / devfreq: cache the last call to get_dev_status() 2015-09-11 14:23:28 +09:00
governor_userspace.c PM / devfreq: constify attribute_group structures. 2017-07-06 10:17:24 +09:00
Kconfig PM / devfreq: Add dependency on PM_OPP 2017-08-28 10:23:57 +09:00
Makefile PM / devfreq: rockchip: add devfreq driver for rk3399 dmc 2016-09-06 13:26:34 +09:00
rk3399_dmc.c PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe() 2017-07-06 10:15:22 +09:00
tegra-devfreq.c PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() 2017-07-06 10:16:17 +09:00