lkml.org 
[lkml]   [2008]   [Feb]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 27 Feb 2008 15:36:58 +0800
FromLi Zefan <>
Subject[PATCH] cpuset: fix return value of cpuset_populate()
- no need to check err == 0
- the last return value of cgroup_add_file() is ignored

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/cpuset.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 3e296ed..1c5b2d2 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1482,10 +1482,10 @@ static int cpuset_populate(struct cgroup_subsys *ss, struct cgroup *cont)
 	if ((err = cgroup_add_file(cont, ss, &cft_spread_slab)) < 0)
 		return err;
 	/* memory_pressure_enabled is in root cpuset only */
-	if (err == 0 && !cont->parent)
+	if (!cont->parent)
 		err = cgroup_add_file(cont, ss,
 					 &cft_memory_pressure_enabled);
-	return 0;
+	return err;
 }
 
 /*
-- 
1.5.4.rc3


\
 
 \ /
  Last update: 2008-02-27 08:41    [from the cache]
©2003-2008