mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(sdmmc): Deinitialize only initialized slots (sdmmc_host_deinit function)
Closes https://github.com/espressif/esp-idf/issues/17937
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user