2010-08-05 06:32:13

by Liu Aleaxander

[permalink] [raw]
Subject: [PATCH] drm_proc: remove the unneeded _name_ variable in function drm_proc_create_files

>From 9cb574dfe14541c7b712242e9fafc55419aa1e4f Mon Sep 17 00:00:00 2001
From: Liu Aleaxander <[email protected]>
Date: Thu, 5 Aug 2010 14:02:52 -0400
Subject: [PATCH] drm_proc: remove the unneeded _name_ variable in
function drm_proc_create_files

The _name_ variable in drm_proc_create_files is misused, since it hasn't been
initialized before using it.

Signed-off-by: Liu Aleaxander <[email protected]>
---
drivers/gpu/drm/drm_proc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c
index a9ba6b6..02f5c98 100644
--- a/drivers/gpu/drm/drm_proc.c
+++ b/drivers/gpu/drm/drm_proc.c
@@ -96,7 +96,6 @@ int drm_proc_create_files(struct drm_info_list
*files, int count,
struct drm_device *dev = minor->dev;
struct proc_dir_entry *ent;
struct drm_info_node *tmp;
- char name[64];
int i, ret;

for (i = 0; i < count; i++) {
@@ -118,8 +117,8 @@ int drm_proc_create_files(struct drm_info_list
*files, int count,
ent = proc_create_data(files[i].name, S_IRUGO, root,
&drm_proc_fops, tmp);
if (!ent) {
- DRM_ERROR("Cannot create /proc/dri/%s/%s\n",
- name, files[i].name);
+ DRM_ERROR("Cannot create /proc/dri/%d/%s\n",
+ minor->index, files[i].name);
list_del(&tmp->list);
kfree(tmp);
ret = -1;
--
1.7.0.1


--
regards
Liu Aleaxander