linux-brain/drivers/devfreq
Chanwoo Choi f5c3fd8328 PM / devfreq: Fix memory leak when fail to register device
commit 9e14de1077 upstream.

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).

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-27 14:39:24 +02:00
..
event PM / devfreq: exynos-nocp: Remove redundant code 2016-10-10 23:56:22 +02:00
devfreq-event.c PM / devfreq: make devfreq-event explicitly non-modular 2016-07-06 13:11:22 +09:00
devfreq.c PM / devfreq: Fix memory leak when fail to register device 2017-09-27 14:39:24 +02:00
exynos-bus.c PM / devfreq: exynos-bus: Fix the wrong return value 2017-01-26 08:24:44 +01:00
governor_passive.c PM / devfreq: Fix wrong trans_stat of passive devfreq device 2017-03-12 06:41:44 +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: governors: add GPL module license and allow module build 2012-11-20 18:46:23 +09:00
governor.h PM / devfreq: Fix wrong trans_stat of passive devfreq device 2017-03-12 06:41:44 +01:00
Kconfig PM / devfreq: rockchip: add PM_DEVFREQ_EVENT dependency 2016-09-19 13:12:17 +02: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: Remove explictly regulator_put call in .remove 2016-09-19 13:36:20 +02:00
tegra-devfreq.c PM / devfreq: tegra: Set freq in rate callback 2016-02-23 14:27:42 +09:00