fix(sdmmc): Deinitialize only initialized slots (sdmmc_host_deinit function)

Closes https://github.com/espressif/esp-idf/issues/17937
This commit is contained in:
Adam Múdry
2025-12-02 09:56:24 +01:00
parent 07d815b447
commit 15609b0424
+3 -1
View File
@@ -929,7 +929,9 @@ esp_err_t sdmmc_host_deinit(void)
return ESP_ERR_INVALID_STATE;
}
for (int slot = 0; slot < SOC_SDMMC_NUM_SLOTS; slot++) {
sdmmc_host_deinit_slot_internal(slot);
if (sdmmc_host_slot_initialized(slot)) {
sdmmc_host_deinit_slot_internal(slot);
}
}
sdmmc_host_deinit_internal();