summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2011-07-30 14:26:01 +0000
committerEugeni Dodonov <eugeni.dodonov@intel.com>2012-02-10 18:01:47 -0200
commit4f65618c70307aa26ac2d50a1a95c951aa071c92 (patch)
treedeebfbce6b248e4146052ad5ade23083b5f68bc6
parente3caaeee2c5a0e8bc10581d49335819ec80115ca (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> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.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 8e60cc3afff..84f90b6b700 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,
struct drm_device *dev = minor->dev;
struct dentry *ent;
struct drm_info_node *tmp;
- char name[64];
int i, ret;
for (i = 0; i < count; i++) {
@@ -108,6 +107,9 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
root, tmp, &drm_debugfs_fops);
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",
root->d_name.name, files[i].name);
kfree(tmp);