[PATCH] perf inject: Fix error return code in cmd_inject()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If couldn't parse known build ids. cmd_inject should return a negative error code.

Fixes: a59d0164e202 ("perf inject: Add a command line option to specify build ids.")
Signed-off-by: Sun Ke <sunke32@xxxxxxxxxx>
---
 tools/perf/builtin-inject.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 8ec955402488..5bea538e2380 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -2338,6 +2338,7 @@ int cmd_inject(int argc, const char **argv)
 
 			if (inject.known_build_ids == NULL) {
 				pr_err("Couldn't parse known build ids.\n");
+				ret = -1;
 				goto out_delete;
 			}
 		}
-- 
2.31.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux