From: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] mtk-mdp: fix double mutex_unlock
Date: Mon, 19 Sep 2016 17:03:05 +0800 [thread overview]
Message-ID: <1474275785.11360.0.camel@mtksdaap41> (raw)
In-Reply-To: <5125bca3-0dfa-2e56-d44f-d771af0b9ca8@xs4all.nl>
On Mon, 2016-09-19 at 10:00 +0200, Hans Verkuil wrote:
> 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>
Reviewed-by: Minghsiu Tsai <minghsiu.tsai@mediatek.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;
>
prev parent reply other threads:[~2016-09-19 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 8:00 [PATCH] mtk-mdp: fix double mutex_unlock Hans Verkuil
2016-09-19 9:03 ` Minghsiu Tsai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474275785.11360.0.camel@mtksdaap41 \
--to=minghsiu.tsai@mediatek.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).