From: Kevin Traynor Date: Wed, 6 Feb 2019 12:19:06 +0000 (+0000) Subject: power: fix frequency list buffer validation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e1e4dafbc7b83c695eb745fe033f5c1e9e344454;p=dpdk.git power: fix frequency list buffer validation The frequency list buffer was already validated in power_acpi_cpufreq_freqs(), so the newly added check was redundant. To keep consistency with power_pstate_cpufreq_freqs(), remove the original check and update the log message. Fixes: 2e6ccdb4e088 ("power: fix frequency list to handle null buffer") Cc: stable@dpdk.org Signed-off-by: Kevin Traynor --- diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c index 45412f0b99..534efe817d 100644 --- a/lib/librte_power/power_acpi_cpufreq.c +++ b/lib/librte_power/power_acpi_cpufreq.c @@ -440,8 +440,8 @@ power_acpi_cpufreq_freqs(unsigned int lcore_id, uint32_t *freqs, uint32_t num) { struct rte_power_info *pi; - if (lcore_id >= RTE_MAX_LCORE || !freqs) { - RTE_LOG(ERR, POWER, "Invalid input parameter\n"); + if (lcore_id >= RTE_MAX_LCORE) { + RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); return 0; }