diff --git a/source/ftl/ftl.c b/source/ftl/ftl.c index 2b668d9..68f3d49 100644 --- a/source/ftl/ftl.c +++ b/source/ftl/ftl.c @@ -79,7 +79,6 @@ static int ftl_seek(struct ftl_map *map, uint32_t va) { size_t len; uint32_t offset, dst, src; - int ret; if (va >= ftl_get_capacity(map)) return -1; @@ -100,7 +99,7 @@ static int ftl_seek(struct ftl_map *map, uint32_t va) src = map->outstanding.page << map->log2_page_size; len = offset - map->offset; - if (ret == -ERR_NOT_FOUND) + if (map->outstanding.flags & FTL_NO_MAPPING) flash_write0(map->dev, dst, len); else flash_copy(map->dev, dst, src, len);