media: coda: Remove unbalanced and unneeded mutex unlock [Linux 4.9.187]

This Linux kernel change "media: coda: Remove unbalanced and unneeded mutex unlock" is included in the Linux 4.9.187 release. This change is authored by Ezequiel Garcia <ezequiel [at] collabora.com> on Thu May 2 18:00:43 2019 -0400. The commit for this change in Linux stable tree is 927b5ed (patch) which is from upstream commit 766b9b1. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 766b9b1.

media: coda: Remove unbalanced and unneeded mutex unlock

commit 766b9b168f6c75c350dd87c3e0bc6a9b322f0013 upstream.

The mutex unlock in the threaded interrupt handler is not paired
with any mutex lock. Remove it.

This bug has been here for a really long time, so it applies
to any stable repo.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/media/platform/coda/coda-bit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index df46439..7b4c936 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -2107,7 +2107,6 @@ irqreturn_t coda_irq_handler(int irq, void *data)
    if (ctx == NULL) {
        v4l2_err(&dev->v4l2_dev,
             "Instance released before the end of transaction\n");
-       mutex_unlock(&dev->coda_mutex);
        return IRQ_HANDLED;
    }

Leave a Reply

Your email address will not be published. Required fields are marked *