diff --git a/components/spi_flash/partition.c b/components/spi_flash/partition.c index 4457d63360..718e326aa0 100644 --- a/components/spi_flash/partition.c +++ b/components/spi_flash/partition.c @@ -349,7 +349,6 @@ esp_err_t esp_partition_read(const esp_partition_t* partition, return spi_flash_read(partition->address + src_offset, dst, size); #endif // CONFIG_SPI_FLASH_USE_LEGACY_IMPL } else { -#if CONFIG_SECURE_FLASH_ENC_ENABLED if (partition->flash_chip != esp_flash_default_chip) { return ESP_ERR_NOT_SUPPORTED; } @@ -367,9 +366,6 @@ esp_err_t esp_partition_read(const esp_partition_t* partition, memcpy(dst, buf, size); spi_flash_munmap(handle); return ESP_OK; -#else - return ESP_ERR_NOT_SUPPORTED; -#endif // CONFIG_SECURE_FLASH_ENC_ENABLED } } @@ -391,14 +387,10 @@ esp_err_t esp_partition_write(const esp_partition_t* partition, return spi_flash_write(dst_offset, src, size); #endif // CONFIG_SPI_FLASH_USE_LEGACY_IMPL } else { -#if CONFIG_SECURE_FLASH_ENC_ENABLED if (partition->flash_chip != esp_flash_default_chip) { return ESP_ERR_NOT_SUPPORTED; } return spi_flash_write_encrypted(dst_offset, src, size); -#else - return ESP_ERR_NOT_SUPPORTED; -#endif // CONFIG_SECURE_FLASH_ENC_ENABLED } }