lkml.org 
[lkml]   [2020]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tracing: remove the unused value assignment in test_create_synth_event
Date
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
\
 
 \ /
  Last update: 2020-11-13 08:34    [W:0.031 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site