Commit 3c589073 authored by Prasanna Meda's avatar Prasanna Meda Committed by Linus Torvalds

[PATCH] sysfs: mount error path cleanup

Sysfs mount error path sanity work.  Perhaps we can panic here, but did not
want to disturb the code here.
Signed-off-by: default avatarPrasanna Meda <pmeda@akamai.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 114d4d47
......@@ -93,6 +93,7 @@ int __init sysfs_init(void)
printk(KERN_ERR "sysfs: could not mount!\n");
err = PTR_ERR(sysfs_mount);
sysfs_mount = NULL;
unregister_filesystem(&sysfs_fs_type);
goto out_err;
}
} else
......@@ -101,5 +102,6 @@ int __init sysfs_init(void)
return err;
out_err:
kmem_cache_destroy(sysfs_dir_cachep);
sysfs_dir_cachep = NULL;
goto out;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment