mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
tools/bpftool: Fix error return code in do_batch()
[ Upstream commit ca16b429f39b4ce013bfa7e197f25681e65a2a42 ]
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 668da745af ("tools: bpftool: add support for quotations ...")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhihao Cheng <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Reviewed-by: Quentin Monnet <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
fe5cca1057
commit
5f54370530
1 changed files with 3 additions and 1 deletions
|
|
@ -303,8 +303,10 @@ static int do_batch(int argc, char **argv)
|
|||
n_argc = make_args(buf, n_argv, BATCH_ARG_NB_MAX, lines);
|
||||
if (!n_argc)
|
||||
continue;
|
||||
if (n_argc < 0)
|
||||
if (n_argc < 0) {
|
||||
err = n_argc;
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
if (json_output) {
|
||||
jsonw_start_object(json_wtr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue