Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284904

[PATCH] drm: msm: dsi: Added missing mutex_unlock

From Saurabh Sengar <saurabh.truth@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] drm: msm: dsi: Added missing mutex_unlock
Date 2015-12-06 21:00 +0100
Message-ID <qCNDs-2Pc-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


in case of failed to get iova, function was returning without releasing
the mutex. Added it.

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 4c49868..13f937b 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -849,11 +849,11 @@ static int dsi_tx_buf_alloc(struct msm_dsi_host *msm_host, int size)
 	}
 
 	ret = msm_gem_get_iova_locked(msm_host->tx_gem_obj, 0, &iova);
+	mutex_unlock(&dev->struct_mutex);
 	if (ret) {
 		pr_err("%s: failed to get iova, %d\n", __func__, ret);
 		return ret;
 	}
-	mutex_unlock(&dev->struct_mutex);
 
 	if (iova & 0x07) {
 		pr_err("%s: buf NOT 8 bytes aligned\n", __func__);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] drm: msm: dsi: Added missing mutex_unlock Saurabh Sengar <saurabh.truth@gmail.com> - 2015-12-06 21:00 +0100
  Re: [PATCH] drm: msm: dsi: Added missing mutex_unlock Rob Clark <robdclark@gmail.com> - 2015-12-07 18:00 +0100

csiph-web