diff options
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 4 |
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, | |||
346 | mutex_lock(&flash->lock); | 346 | mutex_lock(&flash->lock); |
347 | 347 | ||
348 | /* Wait until finished previous write command. */ | 348 | /* Wait until finished previous write command. */ |
349 | if (wait_till_ready(flash)) | 349 | if (wait_till_ready(flash)) { |
350 | mutex_unlock(&flash->lock); | ||
350 | return 1; | 351 | return 1; |
352 | } | ||
351 | 353 | ||
352 | write_enable(flash); | 354 | write_enable(flash); |
353 | 355 | ||