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

Merge branch 'pm-cpufreq-fixes'

* pm-cpufreq-fixes:
  cpufreq: exynos5440: Fix potential NULL pointer dereference
  cpufreq: check cpufreq driver is valid and cpufreq isn't disabled in cpufreq_get()
  acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate
parents d93faa48 116decb7
...@@ -986,6 +986,10 @@ static int __init acpi_cpufreq_init(void) ...@@ -986,6 +986,10 @@ static int __init acpi_cpufreq_init(void)
{ {
int ret; int ret;
/* don't keep reloading if cpufreq_driver exists */
if (cpufreq_get_current_driver())
return 0;
if (acpi_disabled) if (acpi_disabled)
return 0; return 0;
......
...@@ -1460,6 +1460,9 @@ unsigned int cpufreq_get(unsigned int cpu) ...@@ -1460,6 +1460,9 @@ unsigned int cpufreq_get(unsigned int cpu)
{ {
unsigned int ret_freq = 0; unsigned int ret_freq = 0;
if (cpufreq_disabled() || !cpufreq_driver)
return -ENOENT;
if (!down_read_trylock(&cpufreq_rwsem)) if (!down_read_trylock(&cpufreq_rwsem))
return 0; return 0;
......
...@@ -457,7 +457,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) ...@@ -457,7 +457,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table);
err_put_node: err_put_node:
of_node_put(np); of_node_put(np);
dev_err(dvfs_info->dev, "%s: failed initialization\n", __func__); dev_err(&pdev->dev, "%s: failed initialization\n", __func__);
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