cpuquiet: Clean up sysfs memory properly

Runnable sysfs node wasn't being free'd in stop via a kobject_put call
because the sysfs node wasn't allocated with kobject_create. Now do an
explicity kfree on stop after the kobject_put.

Change-Id: I5ba554312757380dfb2e814f75832b28d4c7edf8
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/346645
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
This commit is contained in:
Sai Gurrappadi
2013-12-17 13:40:45 -08:00
committed by Huang, Tao
parent e7e8701d15
commit 46f7d5dbde

View File

@@ -265,6 +265,7 @@ static void runnables_stop(void)
del_timer_sync(&runnables_timer);
cancel_work_sync(&runnables_work);
kobject_put(runnables_kobject);
kfree(runnables_kobject);
mutex_unlock(&runnables_lock);
}