summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-04-20 08:44:09 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-04-20 08:44:09 +0000
commitae6a7491471db5854f337a8afae10fab3cc90842 (patch)
treeecb8239f87534eb24340660ef0119f3bea795178 /sys
parent726c7d2db4d7049d488790b0019a614d866208bb (diff)
drm/ttm: Fix bo_global and mem_global kfree error
From Trigger Huang b10cc08374728ea79555a1cd98f962b0f942e942 in linux 4.19.y/4.19.36 30f33126feca0fe16df9e9302ffc28a953e2eb37 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/ttm/ttm_bo.c1
-rw-r--r--sys/dev/pci/drm/ttm/ttm_memory.c9
2 files changed, 0 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/ttm/ttm_bo.c b/sys/dev/pci/drm/ttm/ttm_bo.c
index c69f4a09731..229d1a62311 100644
--- a/sys/dev/pci/drm/ttm/ttm_bo.c
+++ b/sys/dev/pci/drm/ttm/ttm_bo.c
@@ -1458,7 +1458,6 @@ static void ttm_bo_global_kobj_release(struct kobject *kobj)
container_of(kobj, struct ttm_bo_global, kobj);
__free_page(glob->dummy_read_page);
- kfree(glob);
}
void ttm_bo_global_release(struct drm_global_reference *ref)
diff --git a/sys/dev/pci/drm/ttm/ttm_memory.c b/sys/dev/pci/drm/ttm/ttm_memory.c
index 329d5bc8859..4280d0fffa7 100644
--- a/sys/dev/pci/drm/ttm/ttm_memory.c
+++ b/sys/dev/pci/drm/ttm/ttm_memory.c
@@ -224,14 +224,6 @@ static ssize_t ttm_mem_global_store(struct kobject *kobj,
}
#endif
-static void ttm_mem_global_kobj_release(struct kobject *kobj)
-{
- struct ttm_mem_global *glob =
- container_of(kobj, struct ttm_mem_global, kobj);
-
- kfree(glob);
-}
-
#ifdef notyet
static struct attribute *ttm_mem_global_attrs[] = {
&ttm_mem_global_lower_mem_limit,
@@ -245,7 +237,6 @@ static const struct sysfs_ops ttm_mem_global_ops = {
#endif
static struct kobj_type ttm_mem_glob_kobj_type = {
- .release = &ttm_mem_global_kobj_release,
#ifdef __linux__
.sysfs_ops = &ttm_mem_global_ops,
.default_attrs = ttm_mem_global_attrs,