summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_bo.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-07-26 09:27:59 +1000
committerDave Airlie <airlied@redhat.com>2021-07-26 09:27:59 +1000
commit35482f9dc56b9bd0f179106da7e461f6c2a2d891 (patch)
treeb04c95e464c3724b5b5b0ba50ad4a26886b2497a /drivers/gpu/drm/ttm/ttm_bo.c
parent8da49a33dda7294c1af508f8aa81cd638d0afd62 (diff)
parentff1176468d368232b684f75e82563369208bc371 (diff)
Backmerge tag 'v5.14-rc3' into drm-next
Linux 5.14-rc3 Daniel said we should pull the nouveau fix from fixes in here, probably a good plan. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 20fbfd922266..ea4add2b9717 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -102,6 +102,9 @@ void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo,
return;
}
+ if (!mem)
+ return;
+
man = ttm_manager_type(bdev, mem->mem_type);
list_move_tail(&bo->lru, &man->lru[bo->priority]);