From: akpm@linux-foundation.org
To: dwmw2@infradead.org
Cc: akpm@linux-foundation.org, linux-mtd@lists.infradead.org,
jirislaby@gmail.com
Subject: [patch 4/8] mtd: sst25l, fix lock imbalance
Date: Thu, 06 Aug 2009 16:05:33 -0700 [thread overview]
Message-ID: <200908062305.n76N5X6G004952@imap1.linux-foundation.org> (raw)
From: Jiri Slaby <jirislaby@gmail.com>
Add an omitted unlock to one sst25l_erase fail path.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/devices/sst25l.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN drivers/mtd/devices/sst25l.c~mtd-sst25l-fix-lock-imbalance drivers/mtd/devices/sst25l.c
--- a/drivers/mtd/devices/sst25l.c~mtd-sst25l-fix-lock-imbalance
+++ a/drivers/mtd/devices/sst25l.c
@@ -180,8 +180,10 @@ static int sst25l_erase(struct mtd_info
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);
_
next reply other threads:[~2009-08-06 23:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 23:05 akpm [this message]
2009-08-10 7:15 ` [patch 4/8] mtd: sst25l, fix lock imbalance Artem Bityutskiy
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=200908062305.n76N5X6G004952@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=jirislaby@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).