[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220127115815.3148950-1-yangyingliang@huawei.com>
Date: Thu, 27 Jan 2022 19:58:15 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-kernel@...r.kernel.org>, <linux-spi@...r.kernel.org>
CC: <p.zabel@...gutronix.de>, <broonie@...nel.org>,
<lhjeff911@...il.com>
Subject: [PATCH -next] spi: Fix missing unlock on error in sp7021_spi_master_transfer_one()
Add the missing unlock before return from sp7021_spi_master_transfer_one()
in the error handling case.
Fixes: f62ca4e2a863 ("spi: Add spi driver for Sunplus SP7021")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
drivers/spi/spi-sunplus-sp7021.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-sunplus-sp7021.c b/drivers/spi/spi-sunplus-sp7021.c
index 627b9c3024e9..cbbb1664017e 100644
--- a/drivers/spi/spi-sunplus-sp7021.c
+++ b/drivers/spi/spi-sunplus-sp7021.c
@@ -351,6 +351,7 @@ static int sp7021_spi_master_transfer_one(struct spi_controller *ctlr, struct sp
if (!wait_for_completion_interruptible_timeout(&pspim->isr_done, timeout)) {
dev_err(&spi->dev, "wait_for_completion err\n");
+ mutex_unlock(&pspim->buf_lock);
return -ETIMEDOUT;
}
--
2.25.1
Powered by blists - more mailing lists