From: Jiri Slaby <jirislaby@gmail.com>
To: dwmw2@infradead.org
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH] MTD: sst25l, fix lock imbalance
Date: Mon, 13 Jul 2009 23:22:04 +0200 [thread overview]
Message-ID: <1247520124-31875-1-git-send-email-jirislaby@gmail.com> (raw)
Add an omitted unlock to one sst25l_erase fail path.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/mtd/devices/sst25l.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 1648685..5022ab2 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -180,8 +180,10 @@ static int sst25l_erase(struct mtd_info *mtd, struct erase_info *instr)
mutex_lock(&flash->lock);
err = sst25l_wait_till_ready(flash);
- if (err)
+ if (err) {
+ mutex_unlock(&flash->lock);
return err;
+ }
while (addr < end) {
err = sst25l_erase_sector(flash, addr);
--
1.6.3.2
reply other threads:[~2009-07-13 21:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1247520124-31875-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.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
Powered by JetHome