aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo_manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_manager.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_manager.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_manager.c b/drivers/gpu/drm/ttm/ttm_bo_manager.c
index 9212494e9072..e4367f91472a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_manager.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_manager.c
@@ -103,18 +103,12 @@ static int ttm_bo_man_init(struct ttm_mem_type_manager *man,
103 unsigned long p_size) 103 unsigned long p_size)
104{ 104{
105 struct ttm_range_manager *rman; 105 struct ttm_range_manager *rman;
106 int ret;
107 106
108 rman = kzalloc(sizeof(*rman), GFP_KERNEL); 107 rman = kzalloc(sizeof(*rman), GFP_KERNEL);
109 if (!rman) 108 if (!rman)
110 return -ENOMEM; 109 return -ENOMEM;
111 110
112 ret = drm_mm_init(&rman->mm, 0, p_size); 111 drm_mm_init(&rman->mm, 0, p_size);
113 if (ret) {
114 kfree(rman);
115 return ret;
116 }
117
118 spin_lock_init(&rman->lock); 112 spin_lock_init(&rman->lock);
119 man->priv = rman; 113 man->priv = rman;
120 return 0; 114 return 0;