diff --git a/components/spi_flash/esp_flash_api.c b/components/spi_flash/esp_flash_api.c index 79188e971c..d5c3105f53 100644 --- a/components/spi_flash/esp_flash_api.c +++ b/components/spi_flash/esp_flash_api.c @@ -1442,10 +1442,12 @@ esp_err_t esp_flash_suspend_cmd_init(esp_flash_t* chip) ESP_EARLY_LOGW(TAG, "Flash suspend feature is enabled"); if (chip->chip_drv->get_chip_caps == NULL) { // chip caps get failed, pass the flash capability check. - ESP_EARLY_LOGW(TAG, "get_chip_caps function pointer hasn't been initialized"); + ESP_EARLY_LOGE(TAG, "get_chip_caps function pointer hasn't been initialized"); + return ESP_ERR_INVALID_ARG; } else { if ((chip->chip_drv->get_chip_caps(chip) & SPI_FLASH_CHIP_CAP_SUSPEND) == 0) { - ESP_EARLY_LOGW(TAG, "Suspend and resume may not supported for this flash model yet."); + ESP_EARLY_LOGE(TAG, "Suspend and resume may not supported for this flash model yet."); + return ESP_ERR_NOT_SUPPORTED; } } return chip->chip_drv->sus_setup(chip);