Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff7ba973 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: 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.

Bug: 145162121
Cc: linux-kernel@vger.kernel.org
Acked-by: default avatarJason Baron <jbaron@akamai.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9fd714cd7f4676e8ff3f840911a8d64cacbeab8b)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I471385f3af3f96c767f59ae76ea0a115c9eb4f7a
parent 2abecdfe
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -956,20 +956,14 @@ static __initdata int ddebug_init_success;

static int __init dynamic_debug_init_debugfs(void)
{
	struct dentry *dir, *file;
	struct dentry *dir;

	if (!ddebug_init_success)
		return -ENODEV;

	dir = debugfs_create_dir("dynamic_debug", NULL);
	if (!dir)
		return -ENOMEM;
	file = debugfs_create_file("control", 0644, dir, NULL,
					&ddebug_proc_fops);
	if (!file) {
		debugfs_remove(dir);
		return -ENOMEM;
	}
	debugfs_create_file("control", 0644, dir, NULL, &ddebug_proc_fops);

	return 0;
}