The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: spi-devel-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] spi: release lock on error path in spi_pump_messages()
Date: Sat, 10 Mar 2012 11:57:29 +0300	[thread overview]
Message-ID: <20120310085729.GB4647@elgon.mountain> (raw)

We should release the lock here and enable IRQs before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 5ae1e84..ab1bdce 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work)
 			if (ret) {
 				dev_err(&master->dev,
 					"failed to unprepare transfer hardware\n");
+				spin_unlock_irqrestore(&master->queue_lock, flags);
 				return;
 			}
 		}

             reply	other threads:[~2012-03-10  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-10  8:57 Dan Carpenter [this message]
2012-03-10  9:38 ` [patch] spi: release lock on error path in spi_pump_messages() walter harms
2012-03-11  2:43   ` Grant Likely
2012-03-11  6:20     ` Dan Carpenter
2012-03-11 13:02       ` Grant Likely

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=20120310085729.GB4647@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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