summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_debugfs_crc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_debugfs_crc.c')
-rw-r--r--drivers/gpu/drm/drm_debugfs_crc.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
index d2f102f01515..7ca486d750e9 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -351,33 +351,19 @@ static const struct file_operations drm_crtc_crc_data_fops = {
.release = crtc_crc_release,
};
-int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc)
+void drm_debugfs_crtc_crc_add(struct drm_crtc *crtc)
{
- struct dentry *crc_ent, *ent;
+ struct dentry *crc_ent;
if (!crtc->funcs->set_crc_source || !crtc->funcs->verify_crc_source)
- return 0;
+ return;
crc_ent = debugfs_create_dir("crc", crtc->debugfs_entry);
- if (!crc_ent)
- return -ENOMEM;
-
- ent = debugfs_create_file("control", S_IRUGO, crc_ent, crtc,
- &drm_crtc_crc_control_fops);
- if (!ent)
- goto error;
-
- ent = debugfs_create_file("data", S_IRUGO, crc_ent, crtc,
- &drm_crtc_crc_data_fops);
- if (!ent)
- goto error;
-
- return 0;
-
-error:
- debugfs_remove_recursive(crc_ent);
- return -ENOMEM;
+ debugfs_create_file("control", S_IRUGO, crc_ent, crtc,
+ &drm_crtc_crc_control_fops);
+ debugfs_create_file("data", S_IRUGO, crc_ent, crtc,
+ &drm_crtc_crc_data_fops);
}
/**