diff options
author | Greg Kroah-Hartman | 2019-01-22 15:50:30 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-06-03 15:39:40 +0200 |
commit | 03eb2a08fccc49f93587666e4e1a14ce00df955a (patch) | |
tree | 30bf5b474f452fc6c80834a3c16dd569262559d0 /arch/sh/mm/asids-debugfs.c | |
parent | hwpoison-inject: no need to check return value of debugfs_create functions (diff) | |
download | kernel-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.c | 11 |
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); |