diff options
-rw-r--r-- | arch/x86/events/intel/lbr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c index 1bd72e900498..439b09d33856 100644 --- a/arch/x86/events/intel/lbr.c +++ b/arch/x86/events/intel/lbr.c | |||
@@ -440,8 +440,7 @@ void intel_pmu_lbr_add(struct perf_event *event) | |||
440 | } | 440 | } |
441 | cpuc->br_sel = event->hw.branch_reg.reg; | 441 | cpuc->br_sel = event->hw.branch_reg.reg; |
442 | 442 | ||
443 | if (branch_user_callstack(cpuc->br_sel) && event->ctx && | 443 | if (branch_user_callstack(cpuc->br_sel) && event->ctx->task_ctx_data) { |
444 | event->ctx->task_ctx_data) { | ||
445 | task_ctx = event->ctx->task_ctx_data; | 444 | task_ctx = event->ctx->task_ctx_data; |
446 | task_ctx->lbr_callstack_users++; | 445 | task_ctx->lbr_callstack_users++; |
447 | } | 446 | } |