mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
boards/esp32: Return proper error code on esp32_spiflash_init
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
7368f7a2c8
commit
2a8e7b064d
@@ -226,7 +226,7 @@ static int setup_littlefs(const char *path, FAR struct mtd_dev_s *mtd,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
||||||
return ERROR;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mnt_pt != NULL)
|
if (mnt_pt != NULL)
|
||||||
@@ -274,7 +274,7 @@ static int setup_spiffs(const char *path, FAR struct mtd_dev_s *mtd,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
ferr("ERROR: Failed to register MTD: %d\n", ret);
|
||||||
return ERROR;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mnt_pt != NULL)
|
if (mnt_pt != NULL)
|
||||||
@@ -354,7 +354,7 @@ static int init_wifi_partition(void)
|
|||||||
if (!mtd)
|
if (!mtd)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
||||||
return ERROR;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
||||||
@@ -418,7 +418,7 @@ static int init_storage_partition(void)
|
|||||||
if (!mtd)
|
if (!mtd)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");
|
||||||
return ERROR;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
#ifdef CONFIG_ESP32_SPIFLASH_SMARTFS
|
||||||
|
|||||||
Reference in New Issue
Block a user