diff mbox

drm_debugfs: Initialise empty variable

Message ID 1312035961-11119-1-git-send-email-emil.l.velikov@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Emil Velikov July 30, 2011, 2:26 p.m. UTC
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 drivers/gpu/drm/drm_debugfs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 9d8c892..57c4a3a 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -108,6 +108,8 @@  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) {
+			strncpy(name, root->d_name.name,
+						min(root->d_name.len, 64));
 			DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
 				  name, files[i].name);
 			kfree(tmp);