Skip to contentSkip to conversation

perf/x86/intel: remove an inconsistent NULL check

PATCH New Dan Carpenter 1 participant 1 message Oct 14, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/x86/intel: remove an inconsistent NULL check

Smatch complains that we don't check "event->ctx" consistently. It's never NULL so we can just remove the check.

arch/x86/events/intel/lbr.c +2 -2
index fc6cf21..81b321a 100644
@@ -458,8 +458,8 @@ void intel_pmu_lbr_del(struct perf_event *event)
 	if (!x86_pmu.lbr_nr)
 		return;
 
-	if (branch_user_callstack(cpuc->br_sel) && event->ctx &&
-					event->ctx->task_ctx_data) {
+	if (branch_user_callstack(cpuc->br_sel) &&
+	    event->ctx->task_ctx_data) {
 		task_ctx = event->ctx->task_ctx_data;
 		task_ctx->lbr_callstack_users--;
 	}