Skip to content

Commit

Permalink
[CPUFREQ] Fix the bug in duplicate freq elimination code in acpi-cpufreq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Venkatesh Pallipadi authored and Dave Jones committed Dec 12, 2006
1 parent 8b9c667 commit 3d4a7ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
perf->states[i].core_frequency * 1000;
valid_states++;
}
data->freq_table[perf->state_count].frequency = CPUFREQ_TABLE_END;
data->freq_table[valid_states].frequency = CPUFREQ_TABLE_END;

result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table);
if (result)
Expand Down

0 comments on commit 3d4a7ef

Please sign in to comment.