[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190122152151.16139-41-gregkh@linuxfoundation.org>
Date: Tue, 22 Jan 2019 16:21:40 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>
Subject: [PATCH] trace: 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: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/trace/trace.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c521b7347482..629bbb45279a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -8107,10 +8107,6 @@ struct dentry *tracing_init_dentry(void)
*/
tr->dir = debugfs_create_automount("tracing", NULL,
trace_automount, NULL);
- if (!tr->dir) {
- pr_warn_once("Could not create debugfs directory 'tracing'\n");
- return ERR_PTR(-ENOMEM);
- }
return NULL;
}
--
2.20.1
Powered by blists - more mailing lists