Skip to content

Commit

Permalink
mm: memcontrol - uninitialised return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Phil Carmody authored and Linus Torvalds committed May 27, 2010
1 parent 5407a56 commit 315c199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 315c199

Please sign in to comment.