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>
This commit is contained in:
@@ -861,13 +861,8 @@ static const struct file_operations pmb_debugfs_fops = {
|
||||
|
||||
static int __init pmb_debugfs_init(void)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
|
||||
dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO,
|
||||
arch_debugfs_dir, NULL, &pmb_debugfs_fops);
|
||||
if (!dentry)
|
||||
return -ENOMEM;
|
||||
|
||||
debugfs_create_file("pmb", S_IFREG | S_IRUGO, arch_debugfs_dir, NULL,
|
||||
&pmb_debugfs_fops);
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(pmb_debugfs_init);
|
||||
|
Reference in New Issue
Block a user