Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: memcontrol: remove unnecessary NULL check before free_percpu()

free_percpu() checks for NULL pointers internally. Remove unneeded NULL
check here.

Link: https://lkml.kernel.org/r/20250417084330.937380-1-nichen@iscas.ac.cn
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Chen Ni and committed by
Andrew Morton
6e14fd33 d0966120

+1 -2
+1 -2
mm/memcontrol-v1.c
··· 2198 2198 2199 2199 void memcg1_free_events(struct mem_cgroup *memcg) 2200 2200 { 2201 - if (memcg->events_percpu) 2202 - free_percpu(memcg->events_percpu); 2201 + free_percpu(memcg->events_percpu); 2203 2202 } 2204 2203 2205 2204 static int __init memcg1_init(void)