Commit 4bcfde3c authored by Anton Gusev's avatar Anton Gusev Committed by sanglipeng
Browse files

tracing: Fix wrong return in kprobe_event_gen_test.c

stable inclusion
from stable-v5.10.177
commit 8b1269b709c9d3314cb2c6283474c4e5340621b7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8b1269b709c9d3314cb2c6283474c4e5340621b7

--------------------------------

[ Upstream commit bc4f359b ]

Overwriting the error code with the deletion result may cause the
function to return 0 despite encountering an error. Commit b111545d
("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: default avatarAnton Gusev <aagusev@ispras.ru>
Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 6320c659
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment