Commit 5d57bd39eb3dbf2866b5f5cee8fbd7a29b00c56f

Authored by Matt Mackall
Committed by Linus Torvalds
1 parent a3e713b5fd

[PATCH] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c

From: Hareesh Nagarajan <hnagar2@gmail.com>

Signed-off-by: Hareesh Nagarajan <hnagar2@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff

... ... @@ -31,11 +31,14 @@
31 31  
32 32 static int __init init_tmpfs(void)
33 33 {
34   - register_filesystem(&tmpfs_fs_type);
  34 + BUG_ON(register_filesystem(&tmpfs_fs_type) != 0);
  35 +
35 36 #ifdef CONFIG_TMPFS
36 37 devfs_mk_dir("shm");
37 38 #endif
38 39 shm_mnt = kern_mount(&tmpfs_fs_type);
  40 + BUG_ON(IS_ERR(shm_mnt));
  41 +
39 42 return 0;
40 43 }
41 44 module_init(init_tmpfs)