Commit e3848694 authored by Mika Kuoppala's avatar Mika Kuoppala Committed by Daniel Vetter

drm/i915: release mutex in i915_gem_init()'s error path

Found with smatch.
Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 7f76b23a
...@@ -4467,8 +4467,10 @@ int i915_gem_init(struct drm_device *dev) ...@@ -4467,8 +4467,10 @@ int i915_gem_init(struct drm_device *dev)
i915_gem_init_global_gtt(dev); i915_gem_init_global_gtt(dev);
ret = i915_gem_context_init(dev); ret = i915_gem_context_init(dev);
if (ret) if (ret) {
mutex_unlock(&dev->struct_mutex);
return ret; return ret;
}
ret = i915_gem_init_hw(dev); ret = i915_gem_init_hw(dev);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment