From patchwork Fri Oct 21 13:59:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9389221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB62F60762 for ; Fri, 21 Oct 2016 14:01:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD5A62A22C for ; Fri, 21 Oct 2016 14:01:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1CC42A233; Fri, 21 Oct 2016 14:01:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 728D72A22F for ; Fri, 21 Oct 2016 14:01:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxaON-000637-Ob; Fri, 21 Oct 2016 14:01:51 +0000 Received: from 177.205.67.60.dynamic.adsl.gvt.net.br ([177.205.67.60] helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxaMx-0004lZ-3w; Fri, 21 Oct 2016 14:00:23 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.87) (envelope-from ) id 1bxaLw-0004gw-2P; Fri, 21 Oct 2016 11:59:20 -0200 From: Mauro Carvalho Chehab To: Subject: [PATCH 2/4] mtk_mdp_vpu: remove a double unlock at the error path Date: Fri, 21 Oct 2016 11:59:17 -0200 Message-Id: <768767961c64dea3fdd86132c9eba87ae652d588.1477058332.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Minghsiu Tsai , Mauro Carvalho Chehab , Mauro Carvalho Chehab , Hans Verkuil , Matthias Brugger , linux-mediatek@lists.infradead.org, Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As warned by smatch: drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c:98 mtk_mdp_vpu_send_msg() error: double unlock 'mutex:&ctx->mdp_dev->vpulock' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c index b38d29e99f7a..5c8caa864e32 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c @@ -91,7 +91,6 @@ 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); dev_err(&ctx->mdp_dev->pdev->dev, "vpu_ipi_send fail status %d\n", err); }