]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/devices/m25p80.c
Merge branch 'fb' into devel
[linux-2.6-omap-h63xx.git] / drivers / mtd / devices / m25p80.c
index 25efd331ef28ce35b4a48f0463f594e221d94aa7..b402269301f6f64e4d22108ffc148f8220108b03 100644 (file)
@@ -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);