Skip to content

Commit

Permalink
[PATCH] Fix capifs bug in initialization error path.
Browse files Browse the repository at this point in the history
This fixes a bug in the capifs initialization code, where the
filesystem is not unregistered if kern_mount() fails.

Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
James Morris authored and Linus Torvalds committed Aug 27, 2005
1 parent 8dbddf1 commit 820d220
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/isdn/capi/capifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ static int __init capifs_init(void)
err = register_filesystem(&capifs_fs_type);
if (!err) {
capifs_mnt = kern_mount(&capifs_fs_type);
if (IS_ERR(capifs_mnt))
if (IS_ERR(capifs_mnt)) {
err = PTR_ERR(capifs_mnt);
unregister_filesystem(&capifs_fs_type);
}
}
if (!err)
printk(KERN_NOTICE "capifs: Rev %s\n", rev);
Expand Down

0 comments on commit 820d220

Please sign in to comment.