Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove()

dev_pm_opp_cpumask_remove_table() is going to change in the next commit
and will not remove dynamic OPPs automatically. They must be removed
with a call to dev_pm_opp_remove().

Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

+2 -7
+2 -7
drivers/cpufreq/mvebu-cpufreq.c
··· 84 84 85 85 ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk) / 2, 0); 86 86 if (ret) { 87 + dev_pm_opp_remove(cpu_dev, clk_get_rate(clk)); 87 88 clk_put(clk); 88 89 dev_err(cpu_dev, "Failed to register OPPs\n"); 89 - goto opp_register_failed; 90 + return ret; 90 91 } 91 92 92 93 ret = dev_pm_opp_set_sharing_cpus(cpu_dev, ··· 100 99 101 100 platform_device_register_simple("cpufreq-dt", -1, NULL, 0); 102 101 return 0; 103 - 104 - opp_register_failed: 105 - /* As registering has failed remove all the opp for all cpus */ 106 - dev_pm_opp_cpumask_remove_table(cpu_possible_mask); 107 - 108 - return ret; 109 102 } 110 103 device_initcall(armada_xp_pmsu_cpufreq_init);