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

Also spotted by Owain Ainsworth.

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:
Chris Wilson 2009-02-06 16:55:20 +00:00 committed by Dave Airlie
parent 3e49c4f4cf
commit a198bc80ae

View File

@ -2480,13 +2480,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
if (dev_priv->mm.wedged) {
DRM_ERROR("Execbuf while wedged\n");
mutex_unlock(&dev->struct_mutex);
return -EIO;
ret = -EIO;
goto pre_mutex_err;
}
if (dev_priv->mm.suspended) {
DRM_ERROR("Execbuf while VT-switched.\n");
mutex_unlock(&dev->struct_mutex);
return -EBUSY;
ret = -EBUSY;
goto pre_mutex_err;
}
/* Look up object handles */