[PATCH 2/2] mm: memcontrol - uninitialised return value

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Phil Carmody
Date: Wednesday, May 5, 2010 - 4:21 am

From: Phil Carmody <ext-phil.2.carmody@nokia.com>

Only an out of memory error will cause ret to be set.

Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 90e32b2..09af773 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3464,7 +3464,7 @@ static int mem_cgroup_unregister_event(struct cgroup *cgrp, struct cftype *cft,
 	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)
-- 
1.6.0.4

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] mm: remove unnecessary use of atomic, Phil Carmody, (Wed May 5, 4:21 am)
[PATCH 2/2] mm: memcontrol - uninitialised return value, Phil Carmody, (Wed May 5, 4:21 am)
Re: [PATCH 1/2] mm: remove unnecessary use of atomic, KAMEZAWA Hiroyuki, (Wed May 5, 11:18 pm)
Re: [PATCH 2/2] mm: memcontrol - uninitialised return value, KAMEZAWA Hiroyuki, (Wed May 5, 11:18 pm)
Re: [PATCH 2/2] mm: memcontrol - uninitialised return value, KAMEZAWA Hiroyuki, (Thu May 6, 6:07 pm)
Re: [PATCH 2/2] mm: memcontrol - uninitialised return value, Kirill A. Shutemov, (Thu May 6, 10:15 pm)