driver/mtd/ftl: Modify erasure result processing error issue
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
0a52dfaa66
commit
c267791f06
@ -383,7 +383,7 @@ static ssize_t ftl_mtd_erase(FAR struct ftl_struct_s *dev, off_t startblock)
|
|||||||
if (dev->lptable == NULL)
|
if (dev->lptable == NULL)
|
||||||
{
|
{
|
||||||
ret = MTD_ERASE(dev->mtd, startblock, 1);
|
ret = MTD_ERASE(dev->mtd, startblock, 1);
|
||||||
if (ret != 1)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Erase block %" PRIdOFF " failed: %zd\n",
|
ferr("ERROR: Erase block %" PRIdOFF " failed: %zd\n",
|
||||||
startblock, ret);
|
startblock, ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user