Skip to contentSkip to conversation

perf: Remove the redundant assignment operation

PATCH New Quanfa Fu 1 participant 1 message May 4, 2023 perf events

lore
Share & tools
lore

Quanfa Fu

author
#0 lore raw

PATCH 1/1 perf: Remove the redundant assignment operation

After commit bd2756811766 ("perf: Rewrite core context handling"), the variable err will be assigned a value before use, so no need to assign it to -EINVAL here.

---
 kernel/events/core.c | 1 -
 1 file changed, 1 deletion(-)
kernel/events/core.c +0 -1
index 68baa8194d9f..c57b7aebf3ee 100644
@@ -4752,7 +4752,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) {
Signature · 1 line
2.31.1