cpufreq: Prevent memory leak in cpufreq_stats on hotplug
authorColin Cross <ccross@android.com>
Sat, 29 Jan 2011 03:32:31 +0000 (19:32 -0800)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:31 +0000 (13:40 -0700)
commit32d3498d047d71b706e7a55803203a969cc2bacf
treed34be398676e6f638a8f46dc58585293299f74f0
parent879d744033fe9394ef9f41f33b185dc5048714c3
cpufreq: Prevent memory leak in cpufreq_stats on hotplug

Ensures that cpufreq_stats_free_table is called before
__cpufreq_remove_dev on cpu hotplug (which also occurs during
suspend on SMP systems) to make sure that sysfs_remove_group
can get called before the cpufreq kobj is freed.  Otherwise,
the sysfs file structures are leaked.

Change-Id: I87e55277272f5cfad47e9e7c92630e990bb90069
Signed-off-by: Colin Cross <ccross@android.com>
drivers/cpufreq/cpufreq_stats.c