drm/msm/dsi: Added missing mutex_unlock
authorsaurabh <saurabh.truth@gmail.com>
Sun, 6 Dec 2015 19:49:21 +0000 (01:19 +0530)
committerRob Clark <robdclark@gmail.com>
Mon, 14 Dec 2015 16:50:57 +0000 (11:50 -0500)
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>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi_host.c

index f61b88e..48f9967 100644 (file)
@@ -1013,11 +1013,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__);