* [PATCH] MTD: sst25l, fix lock imbalance
@ 2009-07-13 21:22 Jiri Slaby
0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2009-07-13 21:22 UTC (permalink / raw)
To: dwmw2; +Cc: linux-mtd, linux-kernel, Jiri Slaby
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-13 21:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-13 21:22 [PATCH] MTD: sst25l, fix lock imbalance Jiri Slaby
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