Commit bd8315c4 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Dave Airlie

drm: simplify error printing in drm_debugfs_create_files

There's no need to copy d_name.name.
Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a0f92199
...@@ -107,11 +107,8 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count, ...@@ -107,11 +107,8 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
root, tmp, &drm_debugfs_fops); root, tmp, &drm_debugfs_fops);
if (!ent) { if (!ent) {
char name[64];
strncpy(name, root->d_name.name,
min(root->d_name.len, 64U));
DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n", DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
name, files[i].name); root->d_name.name, files[i].name);
kfree(tmp); kfree(tmp);
ret = -1; ret = -1;
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment