aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index a586378b1b2b..9ef893d5da88 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -266,10 +266,8 @@ static void ttm_bo_ref_bug(struct kref *list_kref)
266void ttm_bo_list_ref_sub(struct ttm_buffer_object *bo, int count, 266void ttm_bo_list_ref_sub(struct ttm_buffer_object *bo, int count,
267 bool never_free) 267 bool never_free)
268{ 268{
269 while (count--) 269 kref_sub(&bo->list_kref, count,
270 kref_put(&bo->list_kref, 270 (never_free) ? ttm_bo_ref_bug : ttm_bo_release_list);
271 (never_free || (count >= 0)) ? ttm_bo_ref_bug :
272 ttm_bo_release_list);
273} 271}
274 272
275int ttm_bo_reserve(struct ttm_buffer_object *bo, 273int ttm_bo_reserve(struct ttm_buffer_object *bo,