aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-09-18 15:51:42 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-09-19 13:56:53 -0400
commit2eaaa5ff87c675aacd3a869fc5fe75a35bbd5278 (patch)
tree5224bbf24266e1025e08a109b493f932a2dac7bd
parentec77e21b91f0393a5201cfd4571a82ab7d64fd29 (diff)
mtd: sst25l, fix lock imbalance
Add an omitted unlock to one sst25l_erase fail path. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/devices/sst25l.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index ac7d52b420cc..c2baf3353f84 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)
180 mutex_lock(&flash->lock); 180 mutex_lock(&flash->lock);
181 181
182 err = sst25l_wait_till_ready(flash); 182 err = sst25l_wait_till_ready(flash);
183 if (err) 183 if (err) {
184 mutex_unlock(&flash->lock);
184 return err; 185 return err;
186 }
185 187
186 while (addr < end) { 188 while (addr < end) {
187 err = sst25l_erase_sector(flash, addr); 189 err = sst25l_erase_sector(flash, addr);