summaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-28 23:13:19 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 02:29:18 +0200
commitb331d259b1147f82d692f3b866e036017cbde8fe (patch)
treedb8de3a81e63c97c778b950dc6221458df6e6988 /kernel/cpuset.c
parentinit: fix integer as NULL pointer warnings (diff)
downloadlinux-b331d259b1147f82d692f3b866e036017cbde8fe.tar.xz
linux-b331d259b1147f82d692f3b866e036017cbde8fe.zip
kernel: fix integer as NULL pointer warnings
kernel/cpuset.c:1268:52: warning: Using plain integer as NULL pointer kernel/pid_namespace.c:95:24: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Reviewed-by: Paul Jackson <pj@sgi.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 024888bb9814..48a976c52cf5 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1265,7 +1265,8 @@ static ssize_t cpuset_common_file_write(struct cgroup *cont,
return -E2BIG;
/* +1 for nul-terminator */
- if ((buffer = kmalloc(nbytes + 1, GFP_KERNEL)) == 0)
+ buffer = kmalloc(nbytes + 1, GFP_KERNEL);
+ if (!buffer)
return -ENOMEM;
if (copy_from_user(buffer, userbuf, nbytes)) {