]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cpufreq: powernv: Free 'chips' on module exit
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Tue, 2 Feb 2016 19:41:37 +0000 (01:11 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 5 Feb 2016 01:38:01 +0000 (02:38 +0100)
This will free the dynamically allocated memory of 'chips' on
module exit.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/powernv-cpufreq.c

index 547890fd9572179eba4c6ce81caf5bbc8b06b947..53f980bf9b77601bb9d63767ddb80936f3f160d3 100644 (file)
@@ -612,6 +612,7 @@ static void __exit powernv_cpufreq_exit(void)
        unregister_reboot_notifier(&powernv_cpufreq_reboot_nb);
        opal_message_notifier_unregister(OPAL_MSG_OCC,
                                         &powernv_cpufreq_opal_nb);
+       kfree(chips);
        cpufreq_unregister_driver(&powernv_cpufreq_driver);
 }
 module_exit(powernv_cpufreq_exit);