mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
devpts: unregister the file system on error
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
26a2e20f4a
commit
93d5581e20
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue