aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts_rd.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-18 06:07:05 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 17:37:31 -0400
commitc80544dc0b87bb65038355e7aafdc30be16b26ab (patch)
tree176349304bec88a9de16e650c9919462e0dd453c /init/do_mounts_rd.c
parent0e9663ee452ffce0d429656ebbcfe69417a30e92 (diff)
sparse pointer use of zero as null
Get rid of sparse related warnings from places that use integer as NULL pointer. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Andi Kleen <ak@suse.de> Cc: Jeff Garzik <jeff@garzik.org> Cc: Matt Mackall <mpm@selenic.com> Cc: Ian Kent <raven@themaw.net> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/do_mounts_rd.c')
-rw-r--r--init/do_mounts_rd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ed652f40f075..3ac5904d1b12 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -57,7 +57,7 @@ identify_ramdisk_image(int fd, int start_block)
57 unsigned char *buf; 57 unsigned char *buf;
58 58
59 buf = kmalloc(size, GFP_KERNEL); 59 buf = kmalloc(size, GFP_KERNEL);
60 if (buf == 0) 60 if (!buf)
61 return -1; 61 return -1;
62 62
63 minixsb = (struct minix_super_block *) buf; 63 minixsb = (struct minix_super_block *) buf;
@@ -407,12 +407,12 @@ static int __init crd_load(int in_fd, int out_fd)
407 crd_infd = in_fd; 407 crd_infd = in_fd;
408 crd_outfd = out_fd; 408 crd_outfd = out_fd;
409 inbuf = kmalloc(INBUFSIZ, GFP_KERNEL); 409 inbuf = kmalloc(INBUFSIZ, GFP_KERNEL);
410 if (inbuf == 0) { 410 if (!inbuf) {
411 printk(KERN_ERR "RAMDISK: Couldn't allocate gzip buffer\n"); 411 printk(KERN_ERR "RAMDISK: Couldn't allocate gzip buffer\n");
412 return -1; 412 return -1;
413 } 413 }
414 window = kmalloc(WSIZE, GFP_KERNEL); 414 window = kmalloc(WSIZE, GFP_KERNEL);
415 if (window == 0) { 415 if (!window) {
416 printk(KERN_ERR "RAMDISK: Couldn't allocate gzip window\n"); 416 printk(KERN_ERR "RAMDISK: Couldn't allocate gzip window\n");
417 kfree(inbuf); 417 kfree(inbuf);
418 return -1; 418 return -1;