Skip to contentSkip to conversation

tracing: remove the useless value assignment in test_create_synth_event

PATCH New [email protected] 1 participant 1 message Nov 13, 2020 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tracing: remove the useless value assignment in test_create_synth_event

From: Kaixu Xia <[email protected]>

The value of variable ret is overwritten on the delete branch in the test_create_synth_event() and we care more about the above error than this delete portion. Remove it.

---
v2:
-remove the useless assignment in the delete portion.

 kernel/trace/synth_event_gen_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/synth_event_gen_test.c +1 -1
index edd912cd14aa..a4b4bbf8c3bf 100644
@@ -307,7 +307,7 @@ static int __init test_create_synth_event(void)
 	return ret;
  delete:
 	/* We got an error after creating the event, delete it */
-	ret = synth_event_delete("create_synth_test");
+	synth_event_delete("create_synth_test");
 
 	goto out;
 }
Signature · 1 line
2.20.0