mirror of https://gitee.com/openkylin/linux.git
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:
commit
dcc7bc3f3d
|
@ -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)
|
||||||
{
|
{
|
||||||
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)
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue