From 5d57bd39eb3dbf2866b5f5cee8fbd7a29b00c56f Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Sun, 30 Oct 2005 15:03:18 -0800 Subject: [PATCH] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c From: Hareesh Nagarajan Signed-off-by: Hareesh Nagarajan Acked-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/tiny-shmem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mm') diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index c13a2161bca2..b58abcf44ed6 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c @@ -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) -- cgit v1.2.3