From d8ed9ca4f5c0538ddfb42265c5f91cc185aa0507 Mon Sep 17 00:00:00 2001 From: XU pengfei Date: Sat, 8 Oct 2022 17:39:43 +0800 Subject: [PATCH] mm/mmap_lock: Remove unnecessary 'NULL' values from Pointer Pointer variables allocate memory first, and then judge. There is no need to initialize the assignment. Signed-off-by: XU pengfei --- mm/mmap_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c index 1854850b4b897f..65a57731aa158e 100644 --- a/mm/mmap_lock.c +++ b/mm/mmap_lock.c @@ -198,7 +198,7 @@ void trace_mmap_lock_unreg(void) */ static const char *get_mm_memcg_path(struct mm_struct *mm) { - char *buf = NULL; + char *buf; struct mem_cgroup *memcg = get_mem_cgroup_from_mm(mm); if (memcg == NULL)