]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/tiny-shmem.c
[PATCH] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c
[karo-tx-linux.git] / mm / tiny-shmem.c
index c13a2161bca286fd65f75ee087c9990c22d8d744..b58abcf44ed658e0a44b129a216a16e5cfc6f2d7 100644 (file)
@@ -31,11 +31,14 @@ static struct vfsmount *shm_mnt;
 
 static int __init init_tmpfs(void)
 {
-       register_filesystem(&tmpfs_fs_type);
+       BUG_ON(register_filesystem(&tmpfs_fs_type) != 0);
+
 #ifdef CONFIG_TMPFS
        devfs_mk_dir("shm");
 #endif
        shm_mnt = kern_mount(&tmpfs_fs_type);
+       BUG_ON(IS_ERR(shm_mnt));
+
        return 0;
 }
 module_init(init_tmpfs)