tools/bpftool: Fix error return code in do_batch()
authorZhihao Cheng <chengzhihao1@huawei.com>
Wed, 9 Jun 2021 11:59:16 +0000 (19:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:20 +0000 (16:56 +0200)
commit4654f1fc3019b9ecc969fa3b60a4270c01bbea89
treedbf9d422d18ed0ba35934f1b76368e9d2d0f3dcb
parent1ccbb552e3d2064b7c43c2bb9fa71306b6c28f9f
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: 668da745af3c2 ("tools: bpftool: add support for quotations ...")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20210609115916.2186872-1-chengzhihao1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/bpf/bpftool/main.c