ubifs: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Richard Weinberger <richard@nod.at> Cc: Artem Bityutskiy <dedekind1@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: linux-mtd@lists.infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190612152120.GA17450@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -1477,9 +1477,7 @@ static int mount_ubifs(struct ubifs_info *c)
|
||||
if (err)
|
||||
goto out_infos;
|
||||
|
||||
err = dbg_debugfs_init_fs(c);
|
||||
if (err)
|
||||
goto out_infos;
|
||||
dbg_debugfs_init_fs(c);
|
||||
|
||||
c->mounting = 0;
|
||||
|
||||
@@ -2364,9 +2362,7 @@ static int __init ubifs_init(void)
|
||||
if (err)
|
||||
goto out_shrinker;
|
||||
|
||||
err = dbg_debugfs_init();
|
||||
if (err)
|
||||
goto out_compr;
|
||||
dbg_debugfs_init();
|
||||
|
||||
err = register_filesystem(&ubifs_fs_type);
|
||||
if (err) {
|
||||
@@ -2378,7 +2374,6 @@ static int __init ubifs_init(void)
|
||||
|
||||
out_dbg:
|
||||
dbg_debugfs_exit();
|
||||
out_compr:
|
||||
ubifs_compressors_exit();
|
||||
out_shrinker:
|
||||
unregister_shrinker(&ubifs_shrinker_info);
|
||||
|
Reference in New Issue
Block a user