linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtk-mdp: fix double mutex_unlock
@ 2016-09-19  8:00 Hans Verkuil
  2016-09-19  9:03 ` Minghsiu Tsai
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2016-09-19  8:00 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Minghsiu Tsai

Fix smatch error:

media-git/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:100 mtk_mdp_vpu_send_msg() error: double unlock 'mutex:&ctx->mdp_dev->vpulock'

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
index 39188e5..4893825 100644
--- a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
+++ b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
@@ -92,11 +92,9 @@ static int mtk_mdp_vpu_send_msg(void *msg, int len, struct mtk_mdp_vpu *vpu,

 	mutex_lock(&ctx->mdp_dev->vpulock);
 	err = vpu_ipi_send(vpu->pdev, (enum ipi_id)id, msg, len);
-	if (err) {
-		mutex_unlock(&ctx->mdp_dev->vpulock);
+	if (err)
 		dev_err(&ctx->mdp_dev->pdev->dev,
 			"vpu_ipi_send fail status %d\n", err);
-	}
 	mutex_unlock(&ctx->mdp_dev->vpulock);

 	return err;


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

end of thread, other threads:[~2016-09-19  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19  8:00 [PATCH] mtk-mdp: fix double mutex_unlock Hans Verkuil
2016-09-19  9:03 ` Minghsiu Tsai

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).