diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index 4c215896fbcc2a0647d80ea505f379d3244e680b..67822cf6c025387a1791495a103aca7b2a8e1486 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c @@ -934,7 +934,7 @@ int sm_cache_flush(struct sm_ftl *ftl) /* Try to read all unread areas of the cache block*/ - for_each_bit(sector_num, &ftl->cache_data_invalid_bitmap, + for_each_set_bit(sector_num, &ftl->cache_data_invalid_bitmap, ftl->block_size / SM_SECTOR_SIZE) { if (!sm_read_sector(ftl,