mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
2ebed176a7
commit
13af106276
|
@ -758,8 +758,11 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data,
|
||||||
|
|
||||||
if (!obj_priv->mmap_offset) {
|
if (!obj_priv->mmap_offset) {
|
||||||
ret = i915_gem_create_mmap_offset(obj);
|
ret = i915_gem_create_mmap_offset(obj);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
drm_gem_object_unreference(obj);
|
||||||
|
mutex_unlock(&dev->struct_mutex);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
args->offset = obj_priv->mmap_offset;
|
args->offset = obj_priv->mmap_offset;
|
||||||
|
|
Loading…
Reference in New Issue