diff options
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 6ba497c47df6..7c0e160a2145 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | #define PFX "powernow-k8: " | 47 | #define PFX "powernow-k8: " |
48 | #define BFX PFX "BIOS error: " | 48 | #define BFX PFX "BIOS error: " |
49 | #define VERSION "version 1.60.1" | 49 | #define VERSION "version 1.60.2" |
50 | #include "powernow-k8.h" | 50 | #include "powernow-k8.h" |
51 | 51 | ||
52 | /* serialize freq changes */ | 52 | /* serialize freq changes */ |
@@ -910,6 +910,9 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
910 | unsigned int newstate; | 910 | unsigned int newstate; |
911 | int ret = -EIO; | 911 | int ret = -EIO; |
912 | 912 | ||
913 | if (!data) | ||
914 | return -EINVAL; | ||
915 | |||
913 | /* only run on specific CPU from here on */ | 916 | /* only run on specific CPU from here on */ |
914 | oldmask = current->cpus_allowed; | 917 | oldmask = current->cpus_allowed; |
915 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); | 918 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); |
@@ -969,6 +972,9 @@ static int powernowk8_verify(struct cpufreq_policy *pol) | |||
969 | { | 972 | { |
970 | struct powernow_k8_data *data = powernow_data[pol->cpu]; | 973 | struct powernow_k8_data *data = powernow_data[pol->cpu]; |
971 | 974 | ||
975 | if (!data) | ||
976 | return -EINVAL; | ||
977 | |||
972 | return cpufreq_frequency_table_verify(pol, data->powernow_table); | 978 | return cpufreq_frequency_table_verify(pol, data->powernow_table); |
973 | } | 979 | } |
974 | 980 | ||
@@ -1103,6 +1109,9 @@ static unsigned int powernowk8_get (unsigned int cpu) | |||
1103 | if (!data) | 1109 | if (!data) |
1104 | return -EINVAL; | 1110 | return -EINVAL; |
1105 | 1111 | ||
1112 | if (!data) | ||
1113 | return -EINVAL; | ||
1114 | |||
1106 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 1115 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
1107 | if (smp_processor_id() != cpu) { | 1116 | if (smp_processor_id() != cpu) { |
1108 | printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); | 1117 | printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); |