diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index ff0d94dd3550..f565b6afe414 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -758,8 +758,11 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data, | |||
758 | 758 | ||
759 | if (!obj_priv->mmap_offset) { | 759 | if (!obj_priv->mmap_offset) { |
760 | ret = i915_gem_create_mmap_offset(obj); | 760 | ret = i915_gem_create_mmap_offset(obj); |
761 | if (ret) | 761 | if (ret) { |
762 | drm_gem_object_unreference(obj); | ||
763 | mutex_unlock(&dev->struct_mutex); | ||
762 | return ret; | 764 | return ret; |
765 | } | ||
763 | } | 766 | } |
764 | 767 | ||
765 | args->offset = obj_priv->mmap_offset; | 768 | args->offset = obj_priv->mmap_offset; |