[patch] usb: musb: unlock on error in cppi41_dma_callback()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
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);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux