tracing: Fix wrong return in kprobe_event_gen_test.c
authorAnton Gusev <aagusev@ispras.ru>
Tue, 31 Jan 2023 07:58:18 +0000 (10:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:41 +0000 (12:10 +0200)
commit089d656992c0f5cfdd1ea3f86860d0b67d211a20
tree638faa5dd836870de085a250c2316c9bb5ece9d2
parent88cdf1d8a522bad9b87b04e21b65d1d148232034
tracing: Fix wrong return in kprobe_event_gen_test.c

[ Upstream commit bc4f359b3b607daac0290d0038561237a86b38cb ]

Overwriting the error code with the deletion result may cause the
function to return 0 despite encountering an error. Commit b111545d26c0
("tracing: Remove the useless value assignment in
test_create_synth_event()") solves a similar issue by
returning the original error code, so this patch does the same.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Link: https://lore.kernel.org/linux-trace-kernel/20230131075818.5322-1-aagusev@ispras.ru
Signed-off-by: Anton Gusev <aagusev@ispras.ru>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/kprobe_event_gen_test.c