diff --git a/kernel/events/core.c b/kernel/events/core.c index 425159882a6ffb63046ba5aeb34c5d2482c8dd4a..823a53d72d6a2677528951c7a43e19eea5d7ea25 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -2582,8 +2582,6 @@ static void perf_branch_stack_sched_in(struct task_struct *prev, if (cpuctx->ctx.nr_branch_stack > 0 && pmu->flush_branch_stack) { - pmu = cpuctx->ctx.pmu; - perf_ctx_lock(cpuctx, cpuctx->task_ctx); perf_pmu_disable(pmu);