[PATCH v10 11/11] perf tp_pmu: Remove unnecessary check

Ian Rogers posted 11 patches 1 month, 2 weeks ago
[PATCH v10 11/11] perf tp_pmu: Remove unnecessary check
Posted by Ian Rogers 1 month, 2 weeks ago
The "if" condition is also part of the "while" condition, remove the
"if" to reduce the amount of code.

Reported-by: Howard Chu <howardchu95@gmail.com>
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/tp_pmu.c | 2 --
 1 file changed, 2 deletions(-)

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;
-- 
2.51.0.rc1.167.g924127e9c0-goog