spi: release lock on error path in spi_pump_messages()
We should release the lock here and enable IRQs before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[grant.likely: move unlock above dev_err() call]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 7ea06af..eb3587a 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -533,6 +533,7 @@
if (master->busy) {
ret = master->unprepare_transfer_hardware(master);
if (ret) {
+ spin_unlock_irqrestore(&master->queue_lock, flags);
dev_err(&master->dev,
"failed to unprepare transfer hardware\n");
return;