]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] mtk-mdp: fix double mutex_unlock
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 19 Sep 2016 08:00:34 +0000 (05:00 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 14:09:53 +0000 (12:09 -0200)
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c

index 39188e5e46d0372fdcc1f6585c6ed1b8250ab433..4893825aa5ddeb6fa50d0866b81c4fae633be668 100644 (file)
@@ -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;