From: Daniel Vetter Date: Mon, 2 Apr 2012 21:33:03 +0000 (+0200) Subject: drm/i915: don't leak struct_mutex lock on ppgtt init failures X-Git-Tag: v3.4-rc2~32^2^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e02f14cd48a5da0ebaecf88c93dbd54a81e0dead;p=profile%2Fivi%2Fkernel-x86-ivi.git drm/i915: don't leak struct_mutex lock on ppgtt init failures Reported-by: Konstantin Belousov Reviewed-by: Chris Wilson Signed-Off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8a62285ddbd..785f67f963e 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1222,8 +1222,10 @@ static int i915_load_gem_init(struct drm_device *dev) i915_gem_do_init(dev, 0, mappable_size, gtt_size); ret = i915_gem_init_aliasing_ppgtt(dev); - if (ret) + if (ret) { + mutex_unlock(&dev->struct_mutex); return ret; + } } else { /* Let GEM Manage all of the aperture. *