LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -next] drm/i915: Fix missing unlock on error in i915_gem_init_hw()
@ 2014-12-05  0:55 weiyj_lk
  2014-12-05  1:39 ` Jeremiah Mahler
  2014-12-05 13:21 ` [Intel-gfx] [PATCH -next] drm/i915: Fix missing unlock on error in i915_gem_init_hw() Daniel Vetter
  0 siblings, 2 replies; 8+ messages in thread
From: weiyj_lk @ 2014-12-05  0:55 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula, David Airlie
  Cc: Wei Yongjun, intel-gfx, dri-devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add the missing unlock before return from function i915_gem_init_hw()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 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 d2ba315..3eeb2d0 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4879,8 +4879,10 @@ i915_gem_init_hw(struct drm_device *dev)
 	i915_gem_init_swizzling(dev);
 
 	ret = dev_priv->gt.init_rings(dev);
-	if (ret)
+	if (ret) {
+		mutex_unlock(&dev->struct_mutex);
 		return ret;
+	}
 
 	for (i = 0; i < NUM_L3_SLICES(dev); i++)
 		i915_gem_l3_remap(&dev_priv->ring[RCS], i);


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-05 14:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05  0:55 [PATCH -next] drm/i915: Fix missing unlock on error in i915_gem_init_hw() weiyj_lk
2014-12-05  1:39 ` Jeremiah Mahler
2014-12-05 12:17   ` Jani Nikula
2014-12-05 12:17   ` Jani Nikula
2014-12-05 12:17     ` [PATCH] drm/i915: release struct_mutex on the i915_gem_init_hw fail path Jani Nikula
2014-12-05 13:03       ` Jeremiah Mahler
2014-12-05 14:04         ` [Intel-gfx] " Daniel Vetter
2014-12-05 13:21 ` [Intel-gfx] [PATCH -next] drm/i915: Fix missing unlock on error in i915_gem_init_hw() Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).