aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2013-11-06 05:39:45 +0000
committerIngo Molnar <[email protected]>2013-11-06 05:39:45 +0000
commit97c53b402fcadb50201c23914f614bf8430d9c20 (patch)
tree3c9b94e866d150c3a2d8ac853e388c38fade8b45 /drivers/cpufreq/cpufreq.c
parenthung_task debugging: Add tracepoint to report the hang (diff)
parentLinux 3.12 (diff)
downloadkernel-97c53b402fcadb50201c23914f614bf8430d9c20.tar.gz
kernel-97c53b402fcadb50201c23914f614bf8430d9c20.zip
Merge tag 'v3.12' into core/locking to pick up mutex upates
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 89b3c52cd5c3..04548f7023af 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -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;