[PATCH] events: core: Remove unnecessary ‘NULL’ values from task_epc
From: Li zeming
Date: Tue Jun 04 2024 - 05:08:50 EST
task_epc is assigned first, so it does not need to initialize the
assignment.
Signed-off-by: Li zeming <zeming@xxxxxxxxxxxx>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f0128c5ff278..5e1a4cbdb67d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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;
--
2.18.2