Skip to content

Commit

Permalink
devpts: unregister the file system on error
Browse files Browse the repository at this point in the history
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alan Cox authored and torvalds committed Jun 11, 2009
1 parent 26a2e20 commit 93d5581
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/devpts/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,10 @@ static int __init init_devpts_fs(void)
int err = register_filesystem(&devpts_fs_type);
if (!err) {
devpts_mnt = kern_mount(&devpts_fs_type);
if (IS_ERR(devpts_mnt))
if (IS_ERR(devpts_mnt)) {
err = PTR_ERR(devpts_mnt);
unregister_filesystem(&devpts_fs_type);
}
}
return err;
}
Expand Down

0 comments on commit 93d5581

Please sign in to comment.