perf: remove unneeded assignment in find_get_context()

Message ID 20221111072656.14591-1-lukas.bulwahn@gmail.com
State New
Headers
Series perf: remove unneeded assignment in find_get_context() |

Commit Message

Lukas Bulwahn Nov. 11, 2022, 7:26 a.m. UTC
  Commit bd2756811766 ("perf: Rewrite core context handling") refactors
find_get_context() and with that, the err variable does not need to be
initialized to -EINVAL, as it is set again before all further uses.

Remove this unneeded assignment. No functional change.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
 kernel/events/core.c | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index c7157f8d8d2f..836f8fbb9980 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4735,7 +4735,6 @@  find_get_context(struct task_struct *task, struct perf_event *event)
 		return ctx;
 	}
 
-	err = -EINVAL;
 retry:
 	ctx = perf_lock_task_context(task, &flags);
 	if (ctx) {