diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gem.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gem.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 6cac5cca3d81..cfad667ce785 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c | |||
@@ -134,13 +134,16 @@ void radeon_gem_object_close(struct drm_gem_object *obj, | |||
134 | struct radeon_device *rdev = rbo->rdev; | 134 | struct radeon_device *rdev = rbo->rdev; |
135 | struct radeon_fpriv *fpriv = file_priv->driver_priv; | 135 | struct radeon_fpriv *fpriv = file_priv->driver_priv; |
136 | struct radeon_vm *vm = &fpriv->vm; | 136 | struct radeon_vm *vm = &fpriv->vm; |
137 | int r; | ||
137 | 138 | ||
138 | if (rdev->family < CHIP_CAYMAN) { | 139 | if (rdev->family < CHIP_CAYMAN) { |
139 | return; | 140 | return; |
140 | } | 141 | } |
141 | 142 | ||
142 | if (radeon_bo_reserve(rbo, false)) { | 143 | r = radeon_bo_reserve(rbo, true); |
143 | dev_err(rdev->dev, "leaking bo va because we fail to reserve bo\n"); | 144 | if (r) { |
145 | dev_err(rdev->dev, "leaking bo va because " | ||
146 | "we fail to reserve bo (%d)\n", r); | ||
144 | return; | 147 | return; |
145 | } | 148 | } |
146 | radeon_vm_bo_rmv(rdev, vm, rbo); | 149 | radeon_vm_bo_rmv(rdev, vm, rbo); |