linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] spi: release lock on error path in spi_pump_messages()
@ 2012-03-10  8:57 Dan Carpenter
       [not found] ` <20120310085729.GB4647-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2012-03-10  8:57 UTC (permalink / raw)
  To: Grant Likely
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

We should release the lock here and enable IRQs before returning.

Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 5ae1e84..ab1bdce 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work)
 			if (ret) {
 				dev_err(&master->dev,
 					"failed to unprepare transfer hardware\n");
+				spin_unlock_irqrestore(&master->queue_lock, flags);
 				return;
 			}
 		}

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

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

end of thread, other threads:[~2012-03-11 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-10  8:57 [patch] spi: release lock on error path in spi_pump_messages() Dan Carpenter
     [not found] ` <20120310085729.GB4647-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2012-03-10  9:38   ` walter harms
     [not found]     ` <4F5B2113.3060103-fPG8STNUNVg@public.gmane.org>
2012-03-11  2:43       ` Grant Likely
2012-03-11  6:20         ` Dan Carpenter
2012-03-11 13:02           ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).