Commit c6104fdb authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

exynos5440: free OPP table created during ->init()

OPP layer now supports freeing of OPPs and we should free them once they aren't
useful anymore.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 2f0f609f
...@@ -371,7 +371,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) ...@@ -371,7 +371,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
if (ret) { if (ret) {
dev_err(dvfs_info->dev, dev_err(dvfs_info->dev,
"failed to init cpufreq table: %d\n", ret); "failed to init cpufreq table: %d\n", ret);
goto err_put_node; goto err_free_opp;
} }
dvfs_info->freq_count = dev_pm_opp_get_opp_count(dvfs_info->dev); dvfs_info->freq_count = dev_pm_opp_get_opp_count(dvfs_info->dev);
exynos_sort_descend_freq_table(); exynos_sort_descend_freq_table();
...@@ -423,6 +423,8 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) ...@@ -423,6 +423,8 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
err_free_table: err_free_table:
dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table);
err_free_opp:
of_free_opp_table(dvfs_info->dev);
err_put_node: err_put_node:
of_node_put(np); of_node_put(np);
dev_err(&pdev->dev, "%s: failed initialization\n", __func__); dev_err(&pdev->dev, "%s: failed initialization\n", __func__);
...@@ -433,6 +435,7 @@ static int exynos_cpufreq_remove(struct platform_device *pdev) ...@@ -433,6 +435,7 @@ static int exynos_cpufreq_remove(struct platform_device *pdev)
{ {
cpufreq_unregister_driver(&exynos_driver); cpufreq_unregister_driver(&exynos_driver);
dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table);
of_free_opp_table(dvfs_info->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment