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>
This commit is contained in:
Wu Fengguang 2009-04-18 10:43:32 +08:00 committed by Eric Anholt
parent 7202178867
commit d816f6ac4f
1 changed files with 3 additions and 1 deletions

View File

@ -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));