[Intel-gfx] [PATCH] drm/i915: release mutex in i915_gem_init()'s error path
Mika Kuoppala
mika.kuoppala at linux.intel.com
Fri Jan 31 16:14:02 CET 2014
Found with smatch.
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 08331e1..feedef9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4536,8 +4536,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);
--
1.7.9.5
More information about the Intel-gfx
mailing list