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 <sherry.hurwitz@amd.com> Reviewed-by: Thomas Renninger <trenn@suse.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
5422583bfa
commit
6ae78b4e7c
|
@ -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 New Issue