From: Matt Mackall Date: Sun, 30 Oct 2005 23:03:18 +0000 (-0800) Subject: [PATCH] Error checks omitted in init_tmpfs() in mm/tiny-shmem.c X-Git-Tag: v2.6.15-rc1~59^2~15^2~42 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d57bd39eb3dbf2866b5f5cee8fbd7a29b00c56f;p=linux-2.6 [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 --- diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index c13a2161bc..b58abcf44e 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)