]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
trace: no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 15:21:40 +0000 (16:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2019 13:39:39 +0000 (15:39 +0200)
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

index 1c80521fd43602041d797032a26cac79f665314c..a95c5cd28135d436ed5d44d4a584c1a493714a51 100644 (file)
@@ -8604,10 +8604,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;
 }