diff mbox series

perf: remove unneeded assignment in find_get_context()

Message ID 20221111072656.14591-1-lukas.bulwahn@gmail.com (mailing list archive)
State Handled Elsewhere
Delegated to: BPF
Headers show
Series perf: remove unneeded assignment in find_get_context() | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-PR success PR summary
bpf/vmtest-bpf-VM_Test-1 success Logs for ${{ matrix.test }} on ${{ matrix.arch }} with ${{ matrix.toolchain }}
bpf/vmtest-bpf-VM_Test-2 success Logs for ShellCheck
bpf/vmtest-bpf-VM_Test-3 fail Logs for build for aarch64 with gcc
bpf/vmtest-bpf-VM_Test-4 fail Logs for build for aarch64 with llvm-16
bpf/vmtest-bpf-VM_Test-5 success Logs for build for s390x with gcc
bpf/vmtest-bpf-VM_Test-6 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-VM_Test-7 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-8 success Logs for llvm-toolchain
bpf/vmtest-bpf-VM_Test-9 success Logs for set-matrix

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(-)
diff mbox series

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