summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/sun50i-cpufreq-nvmem.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-27 21:20:03 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-27 21:20:03 +0300
commit0f03610b20ccf72c7bd8cf297c1666a430f6992e (patch)
tree94c7c42ee639b3904086a0c34af56f7b38ae6085 /drivers/cpufreq/sun50i-cpufreq-nvmem.c
parentaf2d861d4cd2a4da5137f795ee3509e6f944a25b (diff)
parente4e6448638a01905faeda9bf96aa9df7c8ef463c (diff)
downloadlinux-0f03610b20ccf72c7bd8cf297c1666a430f6992e.tar.xz
Merge tag 'cpufreq-arm-fixes-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull ARM cpufreq fixes for 5.18-rc5 from Viresh Kumar: "- Fix issues with the Qualcomm's cpufreq driver (Dmitry Baryshkov and Vladimir Zapolskiy). - Fix memory leak with the Sun501 driver (Xiaobing Luo)." * tag 'cpufreq-arm-fixes-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: qcom-cpufreq-hw: Clear dcvs interrupts cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe cpufreq: qcom-cpufreq-hw: Fix throttle frequency value on EPSS platforms cpufreq: qcom-hw: provide online/offline operations cpufreq: qcom-hw: fix the opp entries refcounting cpufreq: qcom-hw: fix the race between LMH worker and cpuhp cpufreq: qcom-hw: drop affinity hint before freeing the IRQ
Diffstat (limited to 'drivers/cpufreq/sun50i-cpufreq-nvmem.c')
-rw-r--r--drivers/cpufreq/sun50i-cpufreq-nvmem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
index 2deed8d8773f..75e1bf3a08f7 100644
--- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
+++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
@@ -98,8 +98,10 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev)
return -ENOMEM;
ret = sun50i_cpufreq_get_efuse(&speed);
- if (ret)
+ if (ret) {
+ kfree(opp_tables);
return ret;
+ }
snprintf(name, MAX_NAME_LEN, "speed%d", speed);