diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-01-27 19:58:15 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-01-28 13:06:52 +0000 |
commit | 20dc69ca1023b7e4c4af3c3495aa5a91e1a9be39 (patch) | |
tree | ffc2044a90d16fa42a14d77e0ab2afbe0a93c469 /drivers/spi/spi-sunplus-sp7021.c | |
parent | 474fc2e6395d62758e80b9ea65f61339296355fc (diff) | |
download | lwn-20dc69ca1023b7e4c4af3c3495aa5a91e1a9be39.tar.gz lwn-20dc69ca1023b7e4c4af3c3495aa5a91e1a9be39.zip |
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@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220127115815.3148950-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sunplus-sp7021.c')
-rw-r--r-- | drivers/spi/spi-sunplus-sp7021.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |