Skip to contentSkip to conversation

events: core: Remove unnecessary ‘NULL’ values from task_epc

PATCH New Li zeming 1 participant 1 message Jun 4, 2024 perf events

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 events: core: Remove unnecessary ‘NULL’ values from task_epc

task_epc is assigned first, so it does not need to initialize the assignment.

---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/events/core.c +1 -1
index f0128c5ff278..5e1a4cbdb67d 100644
@@ -4283,7 +4283,7 @@ ctx_event_to_rotate(struct perf_event_pmu_context *pmu_ctx)
 static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc)
 {
 	struct perf_cpu_context *cpuctx = this_cpu_ptr(&perf_cpu_context);
-	struct perf_event_pmu_context *cpu_epc, *task_epc = NULL;
+	struct perf_event_pmu_context *cpu_epc, *task_epc;
 	struct perf_event *cpu_event = NULL, *task_event = NULL;
 	int cpu_rotate, task_rotate;
 	struct pmu *pmu;
Signature · 1 line
2.18.2