public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch] usb: musb: unlock on error in cppi41_dma_callback()
Date: Wed, 21 Aug 2013 08:38:21 +0000	[thread overview]
Message-ID: <20130821083821.GI5240@elgon.mountain> (raw)

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);
 }
 

             reply	other threads:[~2013-08-21  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  8:38 Dan Carpenter [this message]
2013-08-27 20:05 ` [patch] usb: musb: unlock on error in cppi41_dma_callback() Felipe Balbi
2013-08-28 10:32 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130821083821.GI5240@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox