aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memcontrol.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 00dda352144c..9ed760dc7448 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3691,8 +3691,10 @@ static struct mem_cgroup *mem_cgroup_alloc(void)
3691 else 3691 else
3692 mem = vmalloc(size); 3692 mem = vmalloc(size);
3693 3693
3694 if (mem) 3694 if (!mem)
3695 memset(mem, 0, size); 3695 return NULL;
3696
3697 memset(mem, 0, size);
3696 mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); 3698 mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu);
3697 if (!mem->stat) { 3699 if (!mem->stat) {
3698 if (size < PAGE_SIZE) 3700 if (size < PAGE_SIZE)