mm: memcontrol - uninitialised return value
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Wed, 26 May 2010 21:42:43 +0000 (14:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:12:44 +0000 (09:12 -0700)
Only an out of memory error will cause ret to be set.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c

index 93b0239bc34dc658c324a1dc813da8b64dc16a4f..8c200e86da4cbc818b72db6e7ff3c72faf0480a9 100644 (file)
@@ -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)