mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saurabh Sengar <saurabh.truth@gmail.com>
To: airlied@linux.ie, robdclark@gmail.com, hali@codeaurora.org,
	architt@codeaurora.org, sviau@codeaurora.org,
	u.kleine-koenig@pengutronix.de, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Saurabh Sengar <saurabh.truth@gmail.com>
Subject: [PATCH] drm: msm: dsi: Added missing mutex_unlock
Date: Mon,  7 Dec 2015 01:19:21 +0530	[thread overview]
Message-ID: <1449431361-6844-1-git-send-email-saurabh.truth@gmail.com> (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


             reply	other threads:[~2015-12-06 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 19:49 Saurabh Sengar [this message]
2015-12-07 16:55 ` Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449431361-6844-1-git-send-email-saurabh.truth@gmail.com \
    --to=saurabh.truth@gmail.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hali@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sviau@codeaurora.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®