tools/cpupower: Fix inverted APERF capability check
PATCH 1/1 tools/cpupower: Fix inverted APERF capability check
The capability check was inverted, causing the function to return error when APERF support is available and proceed when it is not.
Negate the condition to return error only when APERF capability is absent.
Signed-off-by Kaushlendra Kumar <[email protected]>
--- tools/power/cpupower/utils/cpufreq-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/cpupower/utils/cpufreq-info.c +1 -1
@@ -270,7 +270,7 @@ static int get_freq_hardware(unsigned int cpu, unsigned int human) {unsigned long freq; -if (cpupower_cpu_info.caps &CPUPOWER_CAP_APERF ) +if (!(cpupower_cpu_info.caps &CPUPOWER_CAP_APERF ))return -EINVAL ; freq =cpufreq_get_freq_hardware (cpu);
Signature · 1 line
2.34.1