aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_gem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 418a6177a653..c60f65a815d3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -106,8 +106,7 @@ nouveau_gem_object_unmap(struct nouveau_bo *nvbo, struct nouveau_vma *vma)
106 106
107 if (mapped) { 107 if (mapped) {
108 spin_lock(&nvbo->bo.bdev->fence_lock); 108 spin_lock(&nvbo->bo.bdev->fence_lock);
109 if (nvbo->bo.sync_obj) 109 fence = nouveau_fence_ref(nvbo->bo.sync_obj);
110 fence = nouveau_fence_ref(nvbo->bo.sync_obj);
111 spin_unlock(&nvbo->bo.bdev->fence_lock); 110 spin_unlock(&nvbo->bo.bdev->fence_lock);
112 } 111 }
113 112
@@ -438,8 +437,7 @@ validate_sync(struct nouveau_channel *chan, struct nouveau_bo *nvbo)
438 int ret = 0; 437 int ret = 0;
439 438
440 spin_lock(&nvbo->bo.bdev->fence_lock); 439 spin_lock(&nvbo->bo.bdev->fence_lock);
441 if (nvbo->bo.sync_obj) 440 fence = nouveau_fence_ref(nvbo->bo.sync_obj);
442 fence = nouveau_fence_ref(nvbo->bo.sync_obj);
443 spin_unlock(&nvbo->bo.bdev->fence_lock); 441 spin_unlock(&nvbo->bo.bdev->fence_lock);
444 442
445 if (fence) { 443 if (fence) {