drm/ttm: tt destroy move null check to outer function.

This just makes things easier later.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-4-airlied@gmail.com
This commit is contained in:
Dave Airlie
2020-09-15 11:04:08 +10:00
parent 2ff6e69c04
commit 395a73f8ba
3 changed files with 3 additions and 3 deletions

View File

@@ -1613,6 +1613,8 @@ EXPORT_SYMBOL(ttm_bo_swapout_all);
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
{
if (bo->ttm == NULL)
return;
ttm_tt_destroy(bo->bdev, bo->ttm);
bo->ttm = NULL;
}