[RFC 1/4] perf tool: Simplify machine__create_modules() a bit

From: Ravi Bangoria
Date: Tue Jan 10 2023 - 01:03:47 EST


Tweak this function a bit. No need to return twice.

Signed-off-by: Ravi Bangoria <ravi.bangoria@xxxxxxx>
---
tools/perf/util/machine.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 803c9d1803dd..ab2919bc0a0d 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1613,10 +1613,8 @@ static int machine__create_modules(struct machine *machine)
if (modules__parse(modules, machine, machine__create_module))
return -1;

- if (!machine__set_modules_path(machine))
- return 0;
-
- pr_debug("Problems setting modules path maps, continuing anyway...\n");
+ if (machine__set_modules_path(machine))
+ pr_debug("Problems setting modules path maps, continuing anyway...\n");

return 0;
}
--
2.39.0