diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-11 15:26:31 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-20 03:21:11 +0100 |
commit | 13af10627676879d1b20ee3cdba9a28f0906dd98 (patch) | |
tree | e169cc0980db0a8db76688386dee6c869d6c2c22 /drivers | |
parent | drm/i915: Set framebuffer alignment based upon the fence constraints. (diff) | |
download | linux-13af10627676879d1b20ee3cdba9a28f0906dd98.tar.xz linux-13af10627676879d1b20ee3cdba9a28f0906dd98.zip |
drm/i915: Release and unlock on mmap_gtt error path.
We failed to unlock the mutex after failing to create the mmap offset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers')
-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, if (!obj_priv->mmap_offset) { ret = i915_gem_create_mmap_offset(obj); - if (ret) + if (ret) { + drm_gem_object_unreference(obj); + mutex_unlock(&dev->struct_mutex); return ret; + } } args->offset = obj_priv->mmap_offset; |