aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-04-18 10:43:32 +0800
committerEric Anholt <eric@anholt.net>2009-04-21 17:53:38 -0700
commitd816f6ac4f9877509baa3610be0d25b7afc29c00 (patch)
treedaa5c8dfe8b742163c6c6f05a598af1bd4dabe21 /drivers/gpu
parent72021788678523047161e97b3dfed695e802a5fd (diff)
downloadkernel_goldelico_gta04-d816f6ac4f9877509baa3610be0d25b7afc29c00.zip
kernel_goldelico_gta04-d816f6ac4f9877509baa3610be0d25b7afc29c00.tar.gz
kernel_goldelico_gta04-d816f6ac4f9877509baa3610be0d25b7afc29c00.tar.bz2
drm/i915: fix unpaired i915 device mutex on entervt failure.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4642115..ee896d9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4087,8 +4087,10 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data,
dev_priv->mm.suspended = 0;
ret = i915_gem_init_ringbuffer(dev);
- if (ret != 0)
+ if (ret != 0) {
+ mutex_unlock(&dev->struct_mutex);
return ret;
+ }
spin_lock(&dev_priv->mm.active_list_lock);
BUG_ON(!list_empty(&dev_priv->mm.active_list));