aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2011-07-30 10:26:01 -0400
committerDave Airlie <airlied@redhat.com>2011-08-04 09:38:52 -0400
commit4d5cb60d3f6c396899a515e0e667d0f855ed66cc (patch)
tree1a468db9dfcb89f74b226dde7115d363704c0ea0
parent0b576372e86c8e6bee01506651b21ec0fe8a1698 (diff)
drm/debugfs: Initialise empty variable
[airlied: move char declaration] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_debugfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 9d8c892d07c9..9d2668a50872 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -90,7 +90,6 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
90 struct drm_device *dev = minor->dev; 90 struct drm_device *dev = minor->dev;
91 struct dentry *ent; 91 struct dentry *ent;
92 struct drm_info_node *tmp; 92 struct drm_info_node *tmp;
93 char name[64];
94 int i, ret; 93 int i, ret;
95 94
96 for (i = 0; i < count; i++) { 95 for (i = 0; i < count; i++) {
@@ -108,6 +107,9 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
108 ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, 107 ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
109 root, tmp, &drm_debugfs_fops); 108 root, tmp, &drm_debugfs_fops);
110 if (!ent) { 109 if (!ent) {
110 char name[64];
111 strncpy(name, root->d_name.name,
112 min(root->d_name.len, 64U));
111 DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n", 113 DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
112 name, files[i].name); 114 name, files[i].name);
113 kfree(tmp); 115 kfree(tmp);