From 315c1998e10527ff364a9883048455e609bc7232 Mon Sep 17 00:00:00 2001 From: Phil Carmody Date: Wed, 26 May 2010 14:42:43 -0700 Subject: [PATCH] mm: memcontrol - uninitialised return value Only an out of memory error will cause ret to be set. Signed-off-by: Phil Carmody Acked-by: Kirill A. Shutemov Cc: Balbir Singh Cc: Daisuke Nishimura Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 93b0239bc34d..8c200e86da4c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3563,7 +3563,7 @@ static int mem_cgroup_usage_unregister_event(struct cgroup *cgrp, int type = MEMFILE_TYPE(cft->private); u64 usage; int size = 0; - int i, j, ret; + int i, j, ret = 0; mutex_lock(&memcg->thresholds_lock); if (type == _MEM) -- 2.34.1