aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_debugfs.c')
-rw-r--r--drivers/gpu/drm/drm_debugfs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 6ce0e2667a85..2960b6d73456 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -100,15 +100,13 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count,
100 (dev->driver->driver_features & features) != features) 100 (dev->driver->driver_features & features) != features)
101 continue; 101 continue;
102 102
103 tmp = drm_alloc(sizeof(struct drm_info_node), 103 tmp = kmalloc(sizeof(struct drm_info_node), GFP_KERNEL);
104 _DRM_DRIVER);
105 ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, 104 ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO,
106 root, tmp, &drm_debugfs_fops); 105 root, tmp, &drm_debugfs_fops);
107 if (!ent) { 106 if (!ent) {
108 DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n", 107 DRM_ERROR("Cannot create /sys/kernel/debug/dri/%s/%s\n",
109 name, files[i].name); 108 name, files[i].name);
110 drm_free(tmp, sizeof(struct drm_info_node), 109 kfree(tmp);
111 _DRM_DRIVER);
112 ret = -1; 110 ret = -1;
113 goto fail; 111 goto fail;
114 } 112 }
@@ -196,8 +194,7 @@ int drm_debugfs_remove_files(struct drm_info_list *files, int count,
196 if (tmp->info_ent == &files[i]) { 194 if (tmp->info_ent == &files[i]) {
197 debugfs_remove(tmp->dent); 195 debugfs_remove(tmp->dent);
198 list_del(pos); 196 list_del(pos);
199 drm_free(tmp, sizeof(struct drm_info_node), 197 kfree(tmp);
200 _DRM_DRIVER);
201 } 198 }
202 } 199 }
203 } 200 }