diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 365a7dc8a4a8..76bbb379d389 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3218,10 +3218,6 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data, | |||
3218 | enum i915_cache_level level; | 3218 | enum i915_cache_level level; |
3219 | int ret; | 3219 | int ret; |
3220 | 3220 | ||
3221 | ret = i915_mutex_lock_interruptible(dev); | ||
3222 | if (ret) | ||
3223 | return ret; | ||
3224 | |||
3225 | switch (args->caching) { | 3221 | switch (args->caching) { |
3226 | case I915_CACHING_NONE: | 3222 | case I915_CACHING_NONE: |
3227 | level = I915_CACHE_NONE; | 3223 | level = I915_CACHE_NONE; |
@@ -3233,6 +3229,10 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data, | |||
3233 | return -EINVAL; | 3229 | return -EINVAL; |
3234 | } | 3230 | } |
3235 | 3231 | ||
3232 | ret = i915_mutex_lock_interruptible(dev); | ||
3233 | if (ret) | ||
3234 | return ret; | ||
3235 | |||
3236 | obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle)); | 3236 | obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle)); |
3237 | if (&obj->base == NULL) { | 3237 | if (&obj->base == NULL) { |
3238 | ret = -ENOENT; | 3238 | ret = -ENOENT; |