Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / misc / lkdtm / core.c
index e9767bdcdb44af99597208d6583f8149a046ece3..66ae6b2a6950caa0a86d55f398cd43170651991e 100644 (file)
@@ -391,7 +391,7 @@ static int __init lkdtm_module_init(void)
 {
        struct crashpoint *crashpoint = NULL;
        const struct crashtype *crashtype = NULL;
-       int ret = -EINVAL;
+       int ret;
        int i;
 
        /* Neither or both of these need to be set */
@@ -434,22 +434,13 @@ static int __init lkdtm_module_init(void)
 
        /* Register debugfs interface */
        lkdtm_debugfs_root = debugfs_create_dir("provoke-crash", NULL);
-       if (!lkdtm_debugfs_root) {
-               pr_err("creating root dir failed\n");
-               return -ENODEV;
-       }
 
        /* Install debugfs trigger files. */
        for (i = 0; i < ARRAY_SIZE(crashpoints); i++) {
                struct crashpoint *cur = &crashpoints[i];
-               struct dentry *de;
 
-               de = debugfs_create_file(cur->name, 0644, lkdtm_debugfs_root,
-                                        cur, &cur->fops);
-               if (de == NULL) {
-                       pr_err("could not create crashpoint %s\n", cur->name);
-                       goto out_err;
-               }
+               debugfs_create_file(cur->name, 0644, lkdtm_debugfs_root, cur,
+                                   &cur->fops);
        }
 
        /* Install crashpoint if one was selected. */