diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2011-07-30 16:26:01 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-08-04 15:38:52 +0200 |
commit | 4d5cb60d3f6c396899a515e0e667d0f855ed66cc (patch) | |
tree | 1a468db9dfcb89f74b226dde7115d363704c0ea0 /drivers/gpu | |
parent | Merge branch 'drm-intel-next' of ssh://master.kernel.org/pub/scm/linux/kernel... (diff) | |
download | linux-4d5cb60d3f6c396899a515e0e667d0f855ed66cc.tar.xz linux-4d5cb60d3f6c396899a515e0e667d0f855ed66cc.zip |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_debugfs.c | 4 |
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, 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", name, files[i].name); kfree(tmp); |