summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/asids-debugfs.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-01-22 15:50:30 +0100
committerGreg Kroah-Hartman2019-06-03 15:39:40 +0200
commit03eb2a08fccc49f93587666e4e1a14ce00df955a (patch)
tree30bf5b474f452fc6c80834a3c16dd569262559d0 /arch/sh/mm/asids-debugfs.c
parenthwpoison-inject: no need to check return value of debugfs_create functions (diff)
downloadkernel-qcow2-linux-03eb2a08fccc49f93587666e4e1a14ce00df955a.tar.gz
kernel-qcow2-linux-03eb2a08fccc49f93587666e4e1a14ce00df955a.tar.xz
kernel-qcow2-linux-03eb2a08fccc49f93587666e4e1a14ce00df955a.zip
sh: 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: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: <linux-sh@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sh/mm/asids-debugfs.c')
-rw-r--r--arch/sh/mm/asids-debugfs.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/sh/mm/asids-debugfs.c b/arch/sh/mm/asids-debugfs.c
index e5539e0f8e3b..4c1ca197e9c5 100644
--- a/arch/sh/mm/asids-debugfs.c
+++ b/arch/sh/mm/asids-debugfs.c
@@ -63,13 +63,8 @@ static const struct file_operations asids_debugfs_fops = {
static int __init asids_debugfs_init(void)
{
- struct dentry *asids_dentry;
-
- asids_dentry = debugfs_create_file("asids", S_IRUSR, arch_debugfs_dir,
- NULL, &asids_debugfs_fops);
- if (!asids_dentry)
- return -ENOMEM;
-
- return PTR_ERR_OR_ZERO(asids_dentry);
+ debugfs_create_file("asids", S_IRUSR, arch_debugfs_dir, NULL,
+ &asids_debugfs_fops);
+ return 0;
}
device_initcall(asids_debugfs_init);