All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] spi: Fix missing unlock on error in sp7021_spi_master_transfer_one()
@ 2022-01-27 11:58 Yang Yingliang
  2022-01-28 15:59 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-01-27 11:58 UTC (permalink / raw)
  To: linux-kernel, linux-spi; +Cc: p.zabel, broonie, lhjeff911

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>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] spi: Fix missing unlock on error in sp7021_spi_master_transfer_one()
  2022-01-27 11:58 [PATCH -next] spi: Fix missing unlock on error in sp7021_spi_master_transfer_one() Yang Yingliang
@ 2022-01-28 15:59 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-01-28 15:59 UTC (permalink / raw)
  To: Yang Yingliang, linux-spi, linux-kernel; +Cc: p.zabel, lhjeff911

On Thu, 27 Jan 2022 19:58:15 +0800, Yang Yingliang wrote:
> Add the missing unlock before return from sp7021_spi_master_transfer_one()
> in the error handling case.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: Fix missing unlock on error in sp7021_spi_master_transfer_one()
      commit: 20dc69ca1023b7e4c4af3c3495aa5a91e1a9be39

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-28 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 11:58 [PATCH -next] spi: Fix missing unlock on error in sp7021_spi_master_transfer_one() Yang Yingliang
2022-01-28 15:59 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.