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: f62ca4e2a8
("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>
This commit is contained in:
parent
474fc2e639
commit
20dc69ca10
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue