Skip to content

Commit

Permalink
drm/ttm: Fix bo_global and mem_global kfree error
Browse files Browse the repository at this point in the history
From Trigger Huang
b10cc08374728ea79555a1cd98f962b0f942e942 in linux 4.19.y/4.19.36
30f33126feca0fe16df9e9302ffc28a953e2eb37 in mainline linux
  • Loading branch information
jonathangray committed Apr 20, 2019
1 parent f22ff85 commit e37aa07
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion sys/dev/pci/drm/ttm/ttm_bo.c
Expand Up @@ -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)
Expand Down
9 changes: 0 additions & 9 deletions sys/dev/pci/drm/ttm/ttm_memory.c
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit e37aa07

Please sign in to comment.