diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-02-06 19:55:20 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-20 05:21:09 +0300 |
commit | a198bc80ae59cf7c6da93bc8bd017b2198148ed7 (patch) | |
tree | 2c0affd1346a94745caa81ab23c99750f08d1819 /drivers/gpu | |
parent | 3e49c4f4cf786b70bbc369b99e590de4bebac1b3 (diff) | |
download | linux-a198bc80ae59cf7c6da93bc8bd017b2198148ed7.tar.xz |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 818576654092..b79ced8f3c61 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -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 */ |