Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbcc3285 authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Rafael J. Wysocki
Browse files

cpufreq: armada-37xx: Fix clock leak



There was no clk_put() balancing the clk_get(). This commit fixes it.

Fixes: 92ce45fb (cpufreq: Add DVFS support for Armada 37xx)
Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
Reported-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b8b10bc2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
	cur_frequency = clk_get_rate(clk);
	if (!cur_frequency) {
		dev_err(cpu_dev, "Failed to get clock rate for CPU\n");
		clk_put(clk);
		return -EINVAL;
	}

@@ -210,6 +211,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
		return -EINVAL;

	armada37xx_cpufreq_dvfs_setup(nb_pm_base, clk, dvfs->divider);
	clk_put(clk);

	for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR;
	     load_lvl++) {