Skip to contentSkip to conversation

usb: musb: unlock on error in cppi41_dma_callback()

PATCH In review Dan Carpenter 2 participants 3 messages Aug 21, 2013 – Aug 28, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: musb: unlock on error in cppi41_dma_callback()

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

---
I cannot compile this code.

drivers/usb/musb/musb_cppi41.c +2 -1
index e64701d..5c42fc1 100644
@@ -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);
 }