Merge drm/drm-next into drm-misc-next
[linux-block.git] / drivers / gpu / drm / ttm / ttm_bo_util.c
index 12be2d3fcc8134ed024c1a1ac2145c403d3b3f06..7b372ede12c245665932f04062212f6c6e8aa329 100644 (file)
@@ -531,15 +531,12 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
                .interruptible = false,
                .no_wait_gpu = false
        };
-       struct ttm_tt *ttm;
+       struct ttm_tt *ttm = bo->ttm;
        pgprot_t prot;
        int ret;
 
-       ret = ttm_tt_create(bo, true);
-       if (ret)
-               return ret;
+       BUG_ON(!ttm);
 
-       ttm = bo->ttm;
        ret = ttm_tt_populate(ttm, &ctx);
        if (ret)
                return ret;