Skip to content

Commit 7dfe37e

Browse files
Shawn Guogregkh
authored andcommitted
cpufreq: qcom-hw: fix dereferencing freed memory 'data'
[ Upstream commit 02fc409 ] Commit 67fc209 ("cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks") introduces an issue of dereferencing freed memory 'data'. Fix it. Fixes: 67fc209 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 75d9be5 commit 7dfe37e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/cpufreq/qcom-cpufreq-hw.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
368368
error:
369369
kfree(data);
370370
unmap_base:
371-
iounmap(data->base);
371+
iounmap(base);
372372
release_region:
373373
release_mem_region(res->start, resource_size(res));
374374
return ret;

0 commit comments

Comments
 (0)