From: Wu Fengguang Date: Sat, 18 Apr 2009 02:43:32 +0000 (+0800) Subject: drm/i915: fix unpaired i915 device mutex on entervt failure. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d816f6ac4f9877509baa3610be0d25b7afc29c00;p=linux-beck.git drm/i915: fix unpaired i915 device mutex on entervt failure. Signed-off-by: Wu Fengguang Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4642115902d6..ee896d91c5bc 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));