power: fix frequency list return code
authorDavid Hunt <david.hunt@intel.com>
Mon, 7 Jan 2019 14:40:23 +0000 (14:40 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 Jan 2019 01:40:41 +0000 (02:40 +0100)
commitad514edf71fbd54c3ef0a8a1b3e112a8f52f53c9
treee386780b551acb31ebe6ec186907a76f9334be9f
parent2e6ccdb4e0887e881de97fe51a038cacca1aedad
power: fix frequency list return code

The power_pstate_cpufreq_freqs() function was returning -1 in an
unsigned int, causing buffer over-runs when the results were being
processed. This function should be returning zero for all error
conditions, similar to it's acpi relation, power_acpi_cpufreq_freqs().

Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility")

Signed-off-by: David Hunt <david.hunt@intel.com>
lib/librte_power/power_pstate_cpufreq.c