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)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sun, 19 Mar 2023 16:20:48 +0000 (12:20 -0400)
commitbc4f359b3b607daac0290d0038561237a86b38cb
tree266fcfde507458aaaef103cb17f8d2a3c3b5c22f
parentc2679254b9c9980d9045f0f722cf093a2b1f7590
tracing: Fix wrong return in kprobe_event_gen_test.c

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>
kernel/trace/kprobe_event_gen_test.c