aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtdblock.c')
-rw-r--r--drivers/mtd/mtdblock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 2cef280e388c..8e50170137e0 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -288,8 +288,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
288 288
289 mutex_init(&mtdblk->cache_mutex); 289 mutex_init(&mtdblk->cache_mutex);
290 mtdblk->cache_state = STATE_EMPTY; 290 mtdblk->cache_state = STATE_EMPTY;
291 if ((mtdblk->mtd->flags & MTD_CAP_RAM) != MTD_CAP_RAM && 291 if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) {
292 mtdblk->mtd->erasesize) {
293 mtdblk->cache_size = mtdblk->mtd->erasesize; 292 mtdblk->cache_size = mtdblk->mtd->erasesize;
294 mtdblk->cache_data = NULL; 293 mtdblk->cache_data = NULL;
295 } 294 }