Skip to content

Commit

Permalink
[media] mtk-mdp: fix double mutex_unlock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hverkuil authored and mchehab committed Oct 21, 2016
1 parent a0345ca commit 669c614
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 669c614

Please sign in to comment.