Commit a198bc80 authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie

drm/i915: Cleanup trivial leak on execbuffer error path.

Also spotted by Owain Ainsworth.
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 3e49c4f4
...@@ -2480,13 +2480,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -2480,13 +2480,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
if (dev_priv->mm.wedged) { if (dev_priv->mm.wedged) {
DRM_ERROR("Execbuf while wedged\n"); DRM_ERROR("Execbuf while wedged\n");
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
return -EIO; ret = -EIO;
goto pre_mutex_err;
} }
if (dev_priv->mm.suspended) { if (dev_priv->mm.suspended) {
DRM_ERROR("Execbuf while VT-switched.\n"); DRM_ERROR("Execbuf while VT-switched.\n");
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
return -EBUSY; ret = -EBUSY;
goto pre_mutex_err;
} }
/* Look up object handles */ /* Look up object handles */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment