Skip to content

Commit 50d44ed

Browse files
Alexey DobriyanLinus Torvalds
authored andcommitted
[PATCH] cramfs: rewrite init_cramfs_fs()
Two lines -- two bugs. :-( Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent dcc8e55 commit 50d44ed

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎fs/cramfs/inode.c‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,15 @@ static struct file_system_type cramfs_fs_type = {
543543

544544
static int __init init_cramfs_fs(void)
545545
{
546-
cramfs_uncompress_init();
547-
return register_filesystem(&cramfs_fs_type);
546+
int rv;
547+
548+
rv = cramfs_uncompress_init();
549+
if (rv < 0)
550+
return rv;
551+
rv = register_filesystem(&cramfs_fs_type);
552+
if (rv < 0)
553+
cramfs_uncompress_exit();
554+
return rv;
548555
}
549556

550557
static void __exit exit_cramfs_fs(void)

0 commit comments

Comments
 (0)