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>
This commit is contained in:

committed by
Linus Torvalds

parent
d613c3e2d8
commit
b331d259b1
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user