Commit b7dea0cb authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/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'
parents a38fd874 fbb31cb8
...@@ -103,6 +103,8 @@ static const struct of_device_id whitelist[] __initconst = { ...@@ -103,6 +103,8 @@ static const struct of_device_id whitelist[] __initconst = {
static const struct of_device_id blacklist[] __initconst = { static const struct of_device_id blacklist[] __initconst = {
{ .compatible = "allwinner,sun50i-h6", }, { .compatible = "allwinner,sun50i-h6", },
{ .compatible = "arm,vexpress", },
{ .compatible = "calxeda,highbank", }, { .compatible = "calxeda,highbank", },
{ .compatible = "calxeda,ecx-2000", }, { .compatible = "calxeda,ecx-2000", },
......
...@@ -317,9 +317,9 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) ...@@ -317,9 +317,9 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
} }
base = ioremap(res->start, resource_size(res)); base = ioremap(res->start, resource_size(res));
if (IS_ERR(base)) { if (!base) {
dev_err(dev, "failed to map resource %pR\n", res); dev_err(dev, "failed to map resource %pR\n", res);
ret = PTR_ERR(base); ret = -ENOMEM;
goto release_region; goto release_region;
} }
...@@ -374,7 +374,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) ...@@ -374,7 +374,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
error: error:
kfree(data); kfree(data);
unmap_base: unmap_base:
iounmap(data->base); iounmap(base);
release_region: release_region:
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment