Identified by Coverity.
>>> CID
1437325: Incorrect expression (BAD_COMPARE)
>>> Comparing pointer "counter_cpu_fds" against "NULL" using anything besides "==" or "!=" is likely to be incorrect.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0d21112a0266d67fafde7a6b81e0062a7a43dce0
return -1;
if (!(config->alloc & COUNTER_ALLOC_PER_CPU) && counter_cpu_fds)
return -1;
- if (!(config->alloc & COUNTER_ALLOC_PER_CPU) && counter_cpu_fds >= 0)
+ if (!(config->alloc & COUNTER_ALLOC_PER_CPU) && nr_counter_cpu_fds >= 0)
return -1;
if (counter_cpu_fds && nr_cpus != nr_counter_cpu_fds)
return -1;