[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]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux