diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2006-11-13 20:47:44 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:20:50 -0500 |
commit | 3d4a7ef3d3f0c9f3cf8da724d5935253a713d8b6 (patch) | |
tree | 5ac8313702b6495171758763eb7bddd6d1b6f81a | |
parent | 8b9c6671f8dbedbd071a9a6c787d4086a8990db4 (diff) |
[CPUFREQ] Fix the bug in duplicate freq elimination code in acpi-cpufreq
Fix the bug in duplicate states elimination in acpi-cpufreq.
Bug: Due to duplicate state elimiation in the loop earlier, the number
of valid_states can be less than perf->state_count, in which case
freq_table was ending up with some garbage/uninitialized entries
in the table.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
From: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 60d20cf427aa..18f4715c655d 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -693,7 +693,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
693 | perf->states[i].core_frequency * 1000; | 693 | perf->states[i].core_frequency * 1000; |
694 | valid_states++; | 694 | valid_states++; |
695 | } | 695 | } |
696 | data->freq_table[perf->state_count].frequency = CPUFREQ_TABLE_END; | 696 | data->freq_table[valid_states].frequency = CPUFREQ_TABLE_END; |
697 | 697 | ||
698 | result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table); | 698 | result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table); |
699 | if (result) | 699 | if (result) |