OSDN Git Service

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)
committerBrian Swetland <swetland@google.com>
Tue, 29 Mar 2011 20:58:03 +0000 (13:58 -0700)
commit182a8c965462c2e97a02349d506eefef869fae21
tree8101bfe45ee9966ae17e5978a6111e8e04928958
parent9f6d5cafb76ff65e75258158cc11b8c8b0c9f762
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