Skip to content

Commit 3ff7975

Browse files
spandruvadarafaeljw
authored andcommitted
cpufreq: intel_pstate: Fix static checker warning for epp variable
Fix warning for: drivers/cpufreq/intel_pstate.c:731 store_energy_performance_preference() error: uninitialized symbol 'epp'. This warning is for a case, when energy_performance_preference attribute matches pre defined strings. In this case the value of raw epp will not be used to set EPP bits in MSR_HWP_REQUEST. So initializing with any value is fine. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Srinivas Pandruvada <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 3a7e4fb commit 3ff7975

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ static ssize_t store_energy_performance_preference(
709709
struct cpudata *cpu_data = all_cpu_data[policy->cpu];
710710
char str_preference[21];
711711
bool raw = false;
712-
u32 epp;
712+
u32 epp = 0;
713713
int ret;
714714

715715
ret = sscanf(buf, "%20s", str_preference);

0 commit comments

Comments
 (0)