* [PATCH] trace: no need to check return value of debugfs_create functions
@ 2019-01-22 15:21 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2019-01-22 15:21 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Steven Rostedt, Ingo Molnar
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@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-22 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22 15:21 [PATCH] trace: no need to check return value of debugfs_create functions Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox