summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2021-02-28 09:33:19 +0800
committerViresh Kumar <viresh.kumar@linaro.org>2021-03-08 16:20:06 +0530
commit02fc409540303801994d076fcdb7064bd634dbf3 (patch)
tree809c439585c0cbeeef4577cb4960956c21a5ce99 /drivers/cpufreq
parenta38fd8748464831584a19438cbb3082b5a2dab15 (diff)
downloadlinux-02fc409540303801994d076fcdb7064bd634dbf3.tar.gz
linux-02fc409540303801994d076fcdb7064bd634dbf3.tar.bz2
linux-02fc409540303801994d076fcdb7064bd634dbf3.zip
cpufreq: qcom-hw: fix dereferencing freed memory 'data'
Commit 67fc209b527d ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks") introduces an issue of dereferencing freed memory 'data'. Fix it. Fixes: 67fc209b527d ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/qcom-cpufreq-hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index d3c23447b892..bee5d67a8227 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -374,7 +374,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
error:
kfree(data);
unmap_base:
- iounmap(data->base);
+ iounmap(base);
release_region:
release_mem_region(res->start, resource_size(res));
return ret;