linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: Remove the redundant assignment operation
@ 2023-05-04  9:50 Quanfa Fu
  0 siblings, 0 replies; only message in thread
From: Quanfa Fu @ 2023-05-04  9:50 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, irogers, adrian.hunter
  Cc: linux-perf-users, linux-kernel, Quanfa Fu

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.

Signed-off-by: Quanfa Fu <quanfafu@gmail.com>
---
 kernel/events/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 68baa8194d9f..c57b7aebf3ee 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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) {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-04  9:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-04  9:50 [PATCH] perf: Remove the redundant assignment operation Quanfa Fu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).