linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch 4/8] mtd: sst25l, fix lock imbalance
@ 2009-08-06 23:05 akpm
  2009-08-10  7:15 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-08-06 23:05 UTC (permalink / raw)
  To: dwmw2; +Cc: akpm, linux-mtd, jirislaby

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 4/8] mtd: sst25l, fix lock imbalance
  2009-08-06 23:05 [patch 4/8] mtd: sst25l, fix lock imbalance akpm
@ 2009-08-10  7:15 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2009-08-10  7:15 UTC (permalink / raw)
  To: akpm; +Cc: linux-mtd, dwmw2, jirislaby

On Thu, 2009-08-06 at 16:05 -0700, akpm@linux-foundation.org wrote:
> 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>

This one is in my l2-mtd-2.6.git.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-10  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 23:05 [patch 4/8] mtd: sst25l, fix lock imbalance akpm
2009-08-10  7:15 ` Artem Bityutskiy

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).