cpuquiet: Clean up sysfs memory properly
authorSai Gurrappadi <sgurrappadi@nvidia.com>
Tue, 17 Dec 2013 21:40:45 +0000 (13:40 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 18 May 2015 08:07:11 +0000 (16:07 +0800)
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>
drivers/cpuquiet/governors/runnable_threads.c

index 79ba69d8057afcdea7d44830f8119a8e625863c2..f20b8c71e3842d6100feb185d0f259ae9fb29b77 100644 (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);
 }