]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/pstore/ftrace.c
pstore: no need to check return value of debugfs_create functions
[linux.git] / fs / pstore / ftrace.c
index 8e0a17ce3180bc5bd172252a86e748d5f8f912fc..bfbfc269807020cc91b1cba4421bafc732e76999 100644 (file)
@@ -112,27 +112,13 @@ static struct dentry *pstore_ftrace_dir;
 
 void pstore_register_ftrace(void)
 {
-       struct dentry *file;
-
        if (!psinfo->write)
                return;
 
        pstore_ftrace_dir = debugfs_create_dir("pstore", NULL);
-       if (!pstore_ftrace_dir) {
-               pr_err("%s: unable to create pstore directory\n", __func__);
-               return;
-       }
-
-       file = debugfs_create_file("record_ftrace", 0600, pstore_ftrace_dir,
-                                  NULL, &pstore_knob_fops);
-       if (!file) {
-               pr_err("%s: unable to create record_ftrace file\n", __func__);
-               goto err_file;
-       }
 
-       return;
-err_file:
-       debugfs_remove(pstore_ftrace_dir);
+       debugfs_create_file("record_ftrace", 0600, pstore_ftrace_dir, NULL,
+                           &pstore_knob_fops);
 }
 
 void pstore_unregister_ftrace(void)