2020-11-13 15:23:32

by Kaixu Xia

[permalink] [raw]
Subject: [PATCH v2] 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.

Reported-by: Tosk Robot <[email protected]>
Signed-off-by: Kaixu Xia <[email protected]>
---
kernel/trace/synth_event_gen_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/synth_event_gen_test.c b/kernel/trace/synth_event_gen_test.c
index edd912cd14aa..a4b4bbf8c3bf 100644
--- a/kernel/trace/synth_event_gen_test.c
+++ b/kernel/trace/synth_event_gen_test.c
@@ -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;
}
--
2.20.0


2020-11-13 15:29:50

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] tracing: remove the useless value assignment in test_create_synth_event

On Fri, Nov 13, 2020 at 11:21:18PM +0800, [email protected] wrote:
> 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.
>
> Reported-by: Tosk Robot <[email protected]>
> Signed-off-by: Kaixu Xia <[email protected]>
> ---
> kernel/trace/synth_event_gen_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

$ ./scripts/get_maintainer.pl kernel/trace/synth_event_gen_test.c
Steven Rostedt <[email protected]> (maintainer:TRACING)
Ingo Molnar <[email protected]> (maintainer:TRACING)
[email protected] (open list)


You have an odd selection of people you copied on this patch, ensuring
thtat the correct people would not see it :(