public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] usb: musb: unlock on error in cppi41_dma_callback()
@ 2013-08-21  8:38 Dan Carpenter
  2013-08-27 20:05 ` Felipe Balbi
  2013-08-28 10:32 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-21  8:38 UTC (permalink / raw)
  To: kernel-janitors

We need to unlock and enable IRQs before returning on error.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I cannot compile this code.

diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index e64701d..5c42fc1 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -151,7 +151,7 @@ static void cppi41_dma_callback(void *private_data)
 				direction,
 				DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 		if (WARN_ON(!dma_desc))
-			return;
+			goto out_unlock;
 
 		dma_desc->callback = cppi41_dma_callback;
 		dma_desc->callback_param = channel;
@@ -164,6 +164,7 @@ static void cppi41_dma_callback(void *private_data)
 			musb_writew(epio, MUSB_RXCSR, csr);
 		}
 	}
+out_unlock:
 	spin_unlock_irqrestore(&musb->lock, flags);
 }
 

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

end of thread, other threads:[~2013-08-28 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21  8:38 [patch] usb: musb: unlock on error in cppi41_dma_callback() Dan Carpenter
2013-08-27 20:05 ` Felipe Balbi
2013-08-28 10:32 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox