aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2d705e8a297e..744bf9803ea3 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3701,15 +3701,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
3701 struct drm_gem_object *obj; 3701 struct drm_gem_object *obj;
3702 struct drm_i915_gem_object *obj_priv; 3702 struct drm_i915_gem_object *obj_priv;
3703 3703
3704 mutex_lock(&dev->struct_mutex);
3705 obj = drm_gem_object_lookup(dev, file_priv, args->handle); 3704 obj = drm_gem_object_lookup(dev, file_priv, args->handle);
3706 if (obj == NULL) { 3705 if (obj == NULL) {
3707 DRM_ERROR("Bad handle in i915_gem_busy_ioctl(): %d\n", 3706 DRM_ERROR("Bad handle in i915_gem_busy_ioctl(): %d\n",
3708 args->handle); 3707 args->handle);
3709 mutex_unlock(&dev->struct_mutex);
3710 return -EBADF; 3708 return -EBADF;
3711 } 3709 }
3712 3710
3711 mutex_lock(&dev->struct_mutex);
3713 /* Update the active list for the hardware's current position. 3712 /* Update the active list for the hardware's current position.
3714 * Otherwise this only updates on a delayed timer or when irqs are 3713 * Otherwise this only updates on a delayed timer or when irqs are
3715 * actually unmasked, and our working set ends up being larger than 3714 * actually unmasked, and our working set ends up being larger than