summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2014-01-31 17:14:02 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-04 12:10:45 +0100
commite38486943e8ce4f35aa886b092224c82a19cc99c (patch)
treeb61d512be37a0ca3bc38b52c8cc195114d1c79be /drivers/gpu/drm/i915/i915_gem.c
parent7f76b23aae21890b28cf415a4f8123523a7abb24 (diff)
drm/i915: release mutex in i915_gem_init()'s error path
Found with smatch. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index d230c3bbb4f..4054ce47a80 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);