linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: remove the unused value assignment in test_create_synth_event
@ 2020-11-13  7:33 xiakaixu1987
  2020-11-13 14:33 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: xiakaixu1987 @ 2020-11-13  7:33 UTC (permalink / raw)
  To: rostedt, mingo; +Cc: linux-kernel, Kaixu Xia

From: Kaixu Xia <kaixuxia@tencent.com>

The value of variable ret is overwritten on the delete branch in the
test_create_synth_event(), so here the value assignment is useless.
Remove it.

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 kernel/trace/synth_event_gen_test.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/trace/synth_event_gen_test.c b/kernel/trace/synth_event_gen_test.c
index edd912cd14aa..c76b4c189560 100644
--- a/kernel/trace/synth_event_gen_test.c
+++ b/kernel/trace/synth_event_gen_test.c
@@ -276,10 +276,8 @@ static int __init test_create_synth_event(void)
 	 */
 	create_synth_test = trace_get_event_file(NULL, "synthetic",
 						 "create_synth_test");
-	if (IS_ERR(create_synth_test)) {
-		ret = PTR_ERR(create_synth_test);
+	if (IS_ERR(create_synth_test))
 		goto delete;
-	}
 
 	/* Enable the event or you won't see anything */
 	ret = trace_array_set_clr_event(create_synth_test->tr,
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-13 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13  7:33 [PATCH] tracing: remove the unused value assignment in test_create_synth_event xiakaixu1987
2020-11-13 14:33 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).