Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13af1062 authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie
Browse files

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 2ebed176
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -758,9 +758,12 @@ 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;