Skip to content

Commit

Permalink
Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/vireshk/pm

Pull ARM cpufreq fixes for 5.12 from Viresh Kumar:

"- Two patches for qcom-hw driver to fix dereferencing and return
   value check.

- Add vexpress to cpufreq-dt blacklist."

* 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  cpufreq: blacklist Arm Vexpress platforms in cpufreq-dt-platdev
  cpufreq: qcom-hw: Fix return value check in qcom_cpufreq_hw_cpu_init()
  cpufreq: qcom-hw: fix dereferencing freed memory 'data'
  • Loading branch information
Rafael J. Wysocki committed Mar 8, 2021
2 parents a38fd87 + fbb31cb commit b7dea0c
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/cpufreq/cpufreq-dt-platdev.c
Original file line number Diff line number Diff line change
@@ -103,6 +103,8 @@ static const struct of_device_id whitelist[] __initconst = {
static const struct of_device_id blacklist[] __initconst = {
{ .compatible = "allwinner,sun50i-h6", },

{ .compatible = "arm,vexpress", },

{ .compatible = "calxeda,highbank", },
{ .compatible = "calxeda,ecx-2000", },

6 changes: 3 additions & 3 deletions drivers/cpufreq/qcom-cpufreq-hw.c
Original file line number Diff line number Diff line change
@@ -317,9 +317,9 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
}

base = ioremap(res->start, resource_size(res));
if (IS_ERR(base)) {
if (!base) {
dev_err(dev, "failed to map resource %pR\n", res);
ret = PTR_ERR(base);
ret = -ENOMEM;
goto release_region;
}

@@ -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;

0 comments on commit b7dea0c

Please sign in to comment.