* [PATCH] spi: sunplus-sp7021: Unlock on error path
@ 2022-01-28 13:56 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-01-28 13:56 UTC (permalink / raw)
To: Li-hao Kuo; +Cc: Mark Brown, linux-spi, kernel-janitors
Drop the "pspim->buf_lock" before returning on this error path.
Fixes: f62ca4e2a863 ("spi: Add spi driver for Sunplus SP7021")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-28 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 13:56 [PATCH] spi: sunplus-sp7021: Unlock on error path Dan Carpenter
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).