提交 6ae78b4e 编写于 作者: S Sherry Hurwitz 提交者: Rafael J. Wysocki

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: NSherry Hurwitz <sherry.hurwitz@amd.com>
Reviewed-by: NThomas Renninger <trenn@suse.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 5422583b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册