aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-18 21:01:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-18 21:01:47 -0400
commitc63fdeee94f87aafc131e5594ab030638044cc29 (patch)
treee0b1f9ed820fc2e95fa2f0663b81afd2d24c9cfc /arch
parentc63f774ca10efa7cbcbd555c072353e1a7ab7fbe (diff)
parent9180053cacfec4aa233a6cabf1256960e75b0abd (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] powernow-k8.c: fix a check-after-use [CPUFREQ] Remove duplicate check in powernow-k8 [CPUFREQ] drivers/cpufreq/cpufreq.c: static functions mustn't be exported [CPUFREQ] If max_freq got reduced (e.g. by _PPC) a write to sysfs scaling_governor let cpufreq core stuck at low max_freq for ever [CPUFREQ] x86_64: Proper null pointer check in powernow_k8_get [CPUFREQ] x86_64: Revert earlier powernow-k8 change [CPUFREQ] Update LART site URL [CPUFREQ] Remove pointless check in conservative governor. [CPUFREQ] trailing whitespace removal de-jour. [CPUFREQ] extra debugging in cpufreq_add_dev()
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 7c0e160a2145..71fffa174425 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -905,14 +905,17 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
905{ 905{
906 cpumask_t oldmask = CPU_MASK_ALL; 906 cpumask_t oldmask = CPU_MASK_ALL;
907 struct powernow_k8_data *data = powernow_data[pol->cpu]; 907 struct powernow_k8_data *data = powernow_data[pol->cpu];
908 u32 checkfid = data->currfid; 908 u32 checkfid;
909 u32 checkvid = data->currvid; 909 u32 checkvid;
910 unsigned int newstate; 910 unsigned int newstate;
911 int ret = -EIO; 911 int ret = -EIO;
912 912
913 if (!data) 913 if (!data)
914 return -EINVAL; 914 return -EINVAL;
915 915
916 checkfid = data->currfid;
917 checkvid = data->currvid;
918
916 /* only run on specific CPU from here on */ 919 /* only run on specific CPU from here on */
917 oldmask = current->cpus_allowed; 920 oldmask = current->cpus_allowed;
918 set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); 921 set_cpus_allowed(current, cpumask_of_cpu(pol->cpu));
@@ -1109,9 +1112,6 @@ static unsigned int powernowk8_get (unsigned int cpu)
1109 if (!data) 1112 if (!data)
1110 return -EINVAL; 1113 return -EINVAL;
1111 1114
1112 if (!data)
1113 return -EINVAL;
1114
1115 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 1115 set_cpus_allowed(current, cpumask_of_cpu(cpu));
1116 if (smp_processor_id() != cpu) { 1116 if (smp_processor_id() != cpu) {
1117 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);