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-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d57bd39eb3dbf2866b5f5cee8fbd7a29b00c56f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 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)