From 669c6141ea78dff885b5bf025456c7dffb669a61 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 19 Sep 2016 05:00:34 -0300 Subject: [PATCH] [media] mtk-mdp: fix double mutex_unlock 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c index 39188e5e46d0..4893825aa5dd 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; -- 2.11.0