mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
cpupower: Fix bug where return value was not used
Save return value from amd_pci_get_num_boost_states and remove redundant setting of *support Signed-off-by: Sherry Hurwitz <[email protected]> Reviewed-by: Thomas Renninger <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
5422583bfa
commit
6ae78b4e7c
1 changed files with 2 additions and 3 deletions
|
|
@ -16,10 +16,9 @@ int cpufreq_has_boost_support(unsigned int cpu, int *support, int *active,
|
|||
|
||||
if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_CBP) {
|
||||
*support = 1;
|
||||
amd_pci_get_num_boost_states(active, states);
|
||||
if (ret <= 0)
|
||||
ret = amd_pci_get_num_boost_states(active, states);
|
||||
if (ret)
|
||||
return ret;
|
||||
*support = 1;
|
||||
} else if (cpupower_cpu_info.caps & CPUPOWER_CAP_INTEL_IDA)
|
||||
*support = *active = 1;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue