From: Mika Kuoppala Date: Fri, 31 Jan 2014 15:14:02 +0000 (+0200) Subject: drm/i915: release mutex in i915_gem_init()'s error path X-Git-Tag: MMI-PSA29.97-13-9~12412^2~62^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e38486943e8ce4f35aa886b092224c82a19cc99c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: release mutex in i915_gem_init()'s error path Found with smatch. Signed-off-by: Mika Kuoppala Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d230c3bbb4ff..4054ce47a805 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4467,8 +4467,10 @@ int i915_gem_init(struct drm_device *dev) i915_gem_init_global_gtt(dev); ret = i915_gem_context_init(dev); - if (ret) + if (ret) { + mutex_unlock(&dev->struct_mutex); return ret; + } ret = i915_gem_init_hw(dev); mutex_unlock(&dev->struct_mutex);