linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: remove unneeded assignment in find_get_context()
@ 2022-11-11  7:26 Lukas Bulwahn
  0 siblings, 0 replies; only message in thread
From: Lukas Bulwahn @ 2022-11-11  7:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ravi Bangoria, linux-perf-users, bpf
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, kernel-janitors,
	linux-kernel, Lukas Bulwahn

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(-)

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) {
-- 
2.17.1


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

only message in thread, other threads:[~2022-11-11  7:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11  7:26 [PATCH] perf: remove unneeded assignment in find_get_context() Lukas Bulwahn

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).