summaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-12 11:35:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-18 07:47:24 -0400
commit9fd714cd7f4676e8ff3f840911a8d64cacbeab8b (patch)
tree6eb314042afcd5b957d6331c765b7a7e112f620e /lib/dynamic_debug.c
parent4a14abc4bbe58aa465f0f5599bf4c612cfeb367f (diff)
lib: dynamic_debug: 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: linux-kernel@vger.kernel.org Acked-by: Jason Baron <jbaron@akamai.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dynamic_debug.c')
-rw-r--r--lib/dynamic_debug.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 8a16c2d498e9..c60409138e13 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -993,20 +993,14 @@ static __initdata int ddebug_init_success;
993 993
994static int __init dynamic_debug_init_debugfs(void) 994static int __init dynamic_debug_init_debugfs(void)
995{ 995{
996 struct dentry *dir, *file; 996 struct dentry *dir;
997 997
998 if (!ddebug_init_success) 998 if (!ddebug_init_success)
999 return -ENODEV; 999 return -ENODEV;
1000 1000
1001 dir = debugfs_create_dir("dynamic_debug", NULL); 1001 dir = debugfs_create_dir("dynamic_debug", NULL);
1002 if (!dir) 1002 debugfs_create_file("control", 0644, dir, NULL, &ddebug_proc_fops);
1003 return -ENOMEM; 1003
1004 file = debugfs_create_file("control", 0644, dir, NULL,
1005 &ddebug_proc_fops);
1006 if (!file) {
1007 debugfs_remove(dir);
1008 return -ENOMEM;
1009 }
1010 return 0; 1004 return 0;
1011} 1005}
1012 1006