Commit 226a893b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Michal Simek

microblaze: 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: Michal Simek <monstr@monstr.eu>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent bfeffd15
...@@ -192,23 +192,14 @@ struct dentry *of_debugfs_root; ...@@ -192,23 +192,14 @@ struct dentry *of_debugfs_root;
static int microblaze_debugfs_init(void) static int microblaze_debugfs_init(void)
{ {
of_debugfs_root = debugfs_create_dir("microblaze", NULL); of_debugfs_root = debugfs_create_dir("microblaze", NULL);
return 0;
return of_debugfs_root == NULL;
} }
arch_initcall(microblaze_debugfs_init); arch_initcall(microblaze_debugfs_init);
# ifdef CONFIG_MMU # ifdef CONFIG_MMU
static int __init debugfs_tlb(void) static int __init debugfs_tlb(void)
{ {
struct dentry *d; debugfs_create_u32("tlb_skip", S_IRUGO, of_debugfs_root, &tlb_skip);
if (!of_debugfs_root)
return -ENODEV;
d = debugfs_create_u32("tlb_skip", S_IRUGO, of_debugfs_root, &tlb_skip);
if (!d)
return -ENOMEM;
return 0; return 0;
} }
device_initcall(debugfs_tlb); device_initcall(debugfs_tlb);
......
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