From 60062f309bdd3ab579e03effcc91eac3fdce50ae Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sun, 18 Aug 2013 16:13:13 +0800 Subject: [PATCH] usb: musb: cppi41: fix missing unlock on error in cppi41_dma_callback() Add the missing unlock before return from function cppi41_dma_callback() in the error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_cppi41.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index e64701d15401b..ae959746f77f0 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -150,8 +150,10 @@ static void cppi41_dma_callback(void *private_data) remain_bytes, direction, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); - if (WARN_ON(!dma_desc)) + if (WARN_ON(!dma_desc)) { + spin_unlock_irqrestore(&musb->lock, flags); return; + } dma_desc->callback = cppi41_dma_callback; dma_desc->callback_param = channel; -- 2.39.5