summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-10 11:57:29 +0300
committerGrant Likely <grant.likely@secretlab.ca>2012-03-10 19:43:37 -0700
commit9af4acc096eeb1ddd6f507d291c7c901949224a6 (patch)
tree509791441d7d6c46dfc67412ce7451f658a1bd37 /drivers/spi
parent054ebcc4a88509e2488f341e8f0400045258f2a1 (diff)
downloadlinux-9af4acc096eeb1ddd6f507d291c7c901949224a6.tar.bz2
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 7ea06af8636a..eb3587a30df2 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -533,6 +533,7 @@ static void spi_pump_messages(struct kthread_work *work)
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;