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
This commit is contained in:
Rafael J. Wysocki 2013-09-27 02:45:36 +02:00
commit dcc7bc3f3d
3 changed files with 8 additions and 1 deletions

View File

@ -986,6 +986,10 @@ static int __init acpi_cpufreq_init(void)
{
int ret;
/* don't keep reloading if cpufreq_driver exists */
if (cpufreq_get_current_driver())
return 0;
if (acpi_disabled)
return 0;

View File

@ -1460,6 +1460,9 @@ unsigned int cpufreq_get(unsigned int cpu)
{
unsigned int ret_freq = 0;
if (cpufreq_disabled() || !cpufreq_driver)
return -ENOENT;
if (!down_read_trylock(&cpufreq_rwsem))
return 0;

View File

@ -457,7 +457,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table);
err_put_node:
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;
}