Skip to content

Commit

Permalink
init: fix integer as NULL pointer warnings
Browse files Browse the repository at this point in the history
init/do_mounts_rd.c:215:13: warning: Using plain integer as NULL pointer
init/do_mounts_md.c:136:45: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
hharrison authored and torvalds committed Apr 29, 2008
1 parent 9d04d92 commit d613c3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion init/do_mounts_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void __init md_setup_drive(void)
else
dev = MKDEV(MD_MAJOR, minor);
create_dev(name, dev);
for (i = 0; i < MD_SB_DISKS && devname != 0; i++) {
for (i = 0; i < MD_SB_DISKS && devname != NULL; i++) {
char *p;
char comp_name[64];
u32 rdev;
Expand Down
2 changes: 1 addition & 1 deletion init/do_mounts_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d613c3e

Please sign in to comment.