From: Ian Rogers Date: Tue, 19 Aug 2025 01:39:41 +0000 (-0700) Subject: perf tp_pmu: Remove unnecessary check X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9105df0185ea3a89e6651985e829897a8d3a94ae;p=users%2Fhch%2Fmisc.git perf tp_pmu: Remove unnecessary check The "if" condition is also part of the "while" condition, remove the "if" to reduce the amount of code. Reported-by: Howard Chu Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Chun-Tse Shao Cc: Collin Funk Cc: Dr. David Alan Gilbert Cc: Gautam Menghani Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Falcon Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xu Yang Link: https://lore.kernel.org/r/20250819013941.209033-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/tp_pmu.c b/tools/perf/util/tp_pmu.c index e7534a973247..eddb9807131a 100644 --- a/tools/perf/util/tp_pmu.c +++ b/tools/perf/util/tp_pmu.c @@ -88,8 +88,6 @@ int tp_pmu__for_each_tp_sys(void *state, tp_sys_callback cb) continue; ret = cb(state, events_ent->d_name); - if (ret) - break; } close(events_dir.dirfd); return ret;