fix(hw_support): spi buslock fix unregister dev api issue

This commit is contained in:
wanckl
2026-08-04 10:59:07 +08:00
parent 7a911c980d
commit d43de5fa7e
6 changed files with 29 additions and 4 deletions
+6 -2
View File
@@ -301,13 +301,17 @@ esp_err_t spi_bus_remove_flash_device(esp_flash_t *chip)
}
spi_bus_lock_dev_handle_t dev_handle = NULL;
esp_flash_deinit_os_functions(chip, &dev_handle);
esp_err_t ret = esp_flash_deinit_os_functions(chip, &dev_handle);
if (ret != ESP_OK) {
return ret;
}
if (dev_handle) {
spi_bus_lock_unregister_dev(dev_handle);
}
free(chip->host);
free(chip);
return ESP_OK;
return ret;
}
/* The default (ie initial boot) no-OS ROM esp_flash_os_functions_t */