Skip to content

Commit

Permalink
drm/i915: release mutex in i915_gem_init()'s error path
Browse files Browse the repository at this point in the history
Found with smatch.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Mika Kuoppala authored and Daniel Vetter committed Feb 4, 2014
1 parent 7f76b23 commit e384869
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e384869

Please sign in to comment.