X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=init%2Fdo_mounts_rd.c;h=46dfd64ae8fb027cf74e1252b91b2919f81a1923;hb=88459d4c7eb68c4a15609e00e5d100e2a305f040;hp=c2683fcd792deb75a5f79d3e0ec02424fecd1a7c;hpb=cc918c7ab7da017bfaf9661420bb5c462e057cfb;p=linux-2.6-omap-h63xx.git diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index c2683fcd792..46dfd64ae8f 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) unsigned char *buf; buf = kmalloc(size, GFP_KERNEL); - if (buf == 0) + if (!buf) return -1; minixsb = (struct minix_super_block *) buf; @@ -212,7 +212,7 @@ int __init rd_load_image(char *from) } buf = kmalloc(BLOCK_SIZE, GFP_KERNEL); - if (buf == 0) { + if (!buf) { printk(KERN_ERR "RAMDISK: could not allocate buffer\n"); goto done; } @@ -262,8 +262,8 @@ int __init rd_load_disk(int n) { if (rd_prompt) change_floppy("root floppy disk to be loaded into RAM disk"); - create_dev("/dev/root", ROOT_DEV, root_device_name); - create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n), NULL); + create_dev("/dev/root", ROOT_DEV); + create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n)); return rd_load_image("/dev/root"); } @@ -407,12 +407,12 @@ static int __init crd_load(int in_fd, int out_fd) crd_infd = in_fd; crd_outfd = out_fd; inbuf = kmalloc(INBUFSIZ, GFP_KERNEL); - if (inbuf == 0) { + if (!inbuf) { printk(KERN_ERR "RAMDISK: Couldn't allocate gzip buffer\n"); return -1; } window = kmalloc(WSIZE, GFP_KERNEL); - if (window == 0) { + if (!window) { printk(KERN_ERR "RAMDISK: Couldn't allocate gzip window\n"); kfree(inbuf); return -1;