diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index de1952a513..8f0a3f292c 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -383,7 +383,7 @@ static ssize_t ftl_mtd_erase(FAR struct ftl_struct_s *dev, off_t startblock) if (dev->lptable == NULL) { ret = MTD_ERASE(dev->mtd, startblock, 1); - if (ret != 1) + if (ret < 0) { ferr("ERROR: Erase block %" PRIdOFF " failed: %zd\n", startblock, ret);