static int qm_create_debugfs_file(struct hisi_qm *qm, enum qm_debug_file index)
 {
-       struct dentry *qm_d = qm->debug.qm_d, *tmp;
+       struct dentry *qm_d = qm->debug.qm_d;
        struct debugfs_file *file = qm->debug.files + index;
 
-       tmp = debugfs_create_file(qm_debug_file_name[index], 0600, qm_d, file,
-                                 &qm_debug_fops);
-       if (IS_ERR(tmp))
-               return -ENOENT;
+       debugfs_create_file(qm_debug_file_name[index], 0600, qm_d, file,
+                           &qm_debug_fops);
 
        file->index = index;
        mutex_init(&file->lock);
  */
 int hisi_qm_debug_init(struct hisi_qm *qm)
 {
-       struct dentry *qm_d, *qm_regs;
+       struct dentry *qm_d;
        int i, ret;
 
        qm_d = debugfs_create_dir("qm", qm->debug.debug_root);
-       if (IS_ERR(qm_d))
-               return -ENOENT;
        qm->debug.qm_d = qm_d;
 
        /* only show this in PF */
                                goto failed_to_create;
                        }
 
-       qm_regs = debugfs_create_file("qm_regs", 0444, qm->debug.qm_d, qm,
-                                     &qm_regs_fops);
-       if (IS_ERR(qm_regs)) {
-               ret = -ENOENT;
-               goto failed_to_create;
-       }
+       debugfs_create_file("qm_regs", 0444, qm->debug.qm_d, qm, &qm_regs_fops);
 
        return 0;
 
 
        struct hisi_qm *qm = &hisi_zip->qm;
        struct device *dev = &qm->pdev->dev;
        struct debugfs_regset32 *regset;
-       struct dentry *tmp_d, *tmp;
+       struct dentry *tmp_d;
        char buf[HZIP_BUF_SIZE];
        int i;
 
                else
                        sprintf(buf, "decomp_core%d", i - HZIP_COMP_CORE_NUM);
 
-               tmp_d = debugfs_create_dir(buf, ctrl->debug_root);
-               if (!tmp_d)
-                       return -ENOENT;
-
                regset = devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL);
                if (!regset)
                        return -ENOENT;
                regset->nregs = ARRAY_SIZE(hzip_dfx_regs);
                regset->base = qm->io_base + core_offsets[i];
 
-               tmp = debugfs_create_regset32("regs", 0444, tmp_d, regset);
-               if (!tmp)
-                       return -ENOENT;
+               tmp_d = debugfs_create_dir(buf, ctrl->debug_root);
+               debugfs_create_regset32("regs", 0444, tmp_d, regset);
        }
 
        return 0;
 
 static int hisi_zip_ctrl_debug_init(struct hisi_zip_ctrl *ctrl)
 {
-       struct dentry *tmp;
        int i;
 
        for (i = HZIP_CURRENT_QM; i < HZIP_DEBUG_FILE_NUM; i++) {
                ctrl->files[i].ctrl = ctrl;
                ctrl->files[i].index = i;
 
-               tmp = debugfs_create_file(ctrl_debug_file_name[i], 0600,
-                                         ctrl->debug_root, ctrl->files + i,
-                                         &ctrl_debug_fops);
-               if (!tmp)
-                       return -ENOENT;
+               debugfs_create_file(ctrl_debug_file_name[i], 0600,
+                                   ctrl->debug_root, ctrl->files + i,
+                                   &ctrl_debug_fops);
        }
 
        return hisi_zip_core_debug_init(ctrl);
        int ret;
 
        dev_d = debugfs_create_dir(dev_name(dev), hzip_debugfs_root);
-       if (!dev_d)
-               return -ENOENT;
 
        qm->debug.debug_root = dev_d;
        ret = hisi_qm_debug_init(qm);
                return;
 
        hzip_debugfs_root = debugfs_create_dir("hisi_zip", NULL);
-       if (IS_ERR_OR_NULL(hzip_debugfs_root))
-               hzip_debugfs_root = NULL;
 }
 
 static void hisi_zip_unregister_debugfs(void)