diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-10-10 13:34:57 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 05:20:34 -0400 |
commit | bd8315c4a8ade3c0cd6c1933ae6e453958397d22 (patch) | |
tree | 01ba9e47ee65cebeb2c2ffb38b6052dc0c2bc8ff | |
parent | a0f92199243adbfe765963d4b4e65d7cbe1eb785 (diff) |
drm: simplify error printing in drm_debugfs_create_files
There's no need to copy d_name.name.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_debugfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 9d2668a50872..b9dc2629ea9a 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c | |||
@@ -107,11 +107,8 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count, | |||
107 | ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, | 107 | ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, |
108 | root, tmp, &drm_debugfs_fops); | 108 | root, tmp, &drm_debugfs_fops); |
109 | if (!ent) { | 109 | if (!ent) { |
110 | char name[64]; | ||
111 | strncpy(name, root->d_name.name, | ||
112 | min(root->d_name.len, 64U)); | ||
113 | DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n", | 110 | DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n", |
114 | name, files[i].name); | 111 | root->d_name.name, files[i].name); |
115 | kfree(tmp); | 112 | kfree(tmp); |
116 | ret = -1; | 113 | ret = -1; |
117 | goto fail; | 114 | goto fail; |