From: Hans Verkuil Date: Mon, 19 Sep 2016 08:00:34 +0000 (-0300) Subject: [media] mtk-mdp: fix double mutex_unlock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=669c6141ea78dff885b5bf025456c7dffb669a61;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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;