From: Alexey Dobriyan Date: Fri, 29 Sep 2006 09:01:04 +0000 (-0700) Subject: [PATCH] cramfs: rewrite init_cramfs_fs() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50d44ed009a628e6d5c784fae18ea743d7cf199a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] cramfs: rewrite init_cramfs_fs() Two lines -- two bugs. :-( Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index ad96b6990715..a624c3ec8189 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -543,8 +543,15 @@ static struct file_system_type cramfs_fs_type = { static int __init init_cramfs_fs(void) { - cramfs_uncompress_init(); - return register_filesystem(&cramfs_fs_type); + int rv; + + rv = cramfs_uncompress_init(); + if (rv < 0) + return rv; + rv = register_filesystem(&cramfs_fs_type); + if (rv < 0) + cramfs_uncompress_exit(); + return rv; } static void __exit exit_cramfs_fs(void)