Commit cf9f67b3 authored by Kang Minchul's avatar Kang Minchul Committed by Arnaldo Carvalho de Melo

perf print-events: Remove redundant comparison with zero

Since variable npmus is unsigned int, comparing with 0 is unnecessary.
Signed-off-by: default avatarKang Minchul <tegongkang@gmail.com>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221105135932.81612-1-tegongkang@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9d895e46
......@@ -311,10 +311,8 @@ int print_hwcache_events(const char *event_glob, bool name_only)
if ((hybrid_supported == 0) ||
(hybrid_supported == npmus)) {
evt_list[evt_i] = strdup(name);
if (npmus > 0) {
for (j = 0; j < npmus; j++)
zfree(&evt_pmus[j]);
}
for (j = 0; j < npmus; j++)
zfree(&evt_pmus[j]);
} else {
for (j = 0; j < hybrid_supported; j++) {
evt_list[evt_i++] = evt_pmus[j];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment