mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(esp_psram): repeated call to init should return invalid state error
Closes https://github.com/espressif/esp-idf/issues/18722
This commit is contained in:
@@ -408,6 +408,10 @@ esp_err_t esp_psram_chip_init(void)
|
||||
|
||||
esp_err_t esp_psram_init(void)
|
||||
{
|
||||
if (s_psram_ctx.is_initialised) {
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
esp_err_t ret = ESP_FAIL;
|
||||
|
||||
if (!s_psram_ctx.is_chip_initialised) {
|
||||
|
||||
Reference in New Issue
Block a user