summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-06-06 11:31:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-06 11:31:18 -0700
commitc8d10bffdbea5f82a8e491467a23fb2cc7da921b (patch)
tree5bb7531c2b3a717ee0ac8e1367f62aa896c75915 /drivers
parenteb4e545d4ac82d9018487edb4419b33b9930c857 (diff)
parentbc01886352c277e310c07befadbb617c8f561b89 (diff)
Merge git://git.infradead.org/~dwmw2/mtd-2.6.26
* git://git.infradead.org/~dwmw2/mtd-2.6.26: [MTD] m25p80.c mutex unlock fix
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/m25p80.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 25efd331ef28..b402269301f6 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -346,8 +346,10 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
mutex_lock(&flash->lock);
/* Wait until finished previous write command. */
- if (wait_till_ready(flash))
+ if (wait_till_ready(flash)) {
+ mutex_unlock(&flash->lock);
return 1;
+ }
write_enable(flash);