kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf inject: Fix error return code in cmd_inject()
@ 2022-08-27  8:38 Sun Ke
  0 siblings, 0 replies; only message in thread
From: Sun Ke @ 2022-08-27  8:38 UTC (permalink / raw)
  To: peterz, mingo, acme
  Cc: linux-perf-users, bpf, kernel-janitors, rsilvera, sunke32

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@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-27  8:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27  8:38 [PATCH] perf inject: Fix error return code in cmd_inject() Sun Ke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).