Merge branch 'bugfix/assert_10_9_when_AFPM_occur' into 'master'

Bugfix/assert 10 9 when afpm occur, Changed the check order for esp_bt_controller_init(master)

See merge request espressif/esp-idf!10982
This commit is contained in:
Jiang Jiang Jian 2020-10-28 19:45:27 +08:00
commit d824ec3b86
2 changed files with 6 additions and 6 deletions

View File

@ -1224,6 +1224,11 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
esp_err_t err;
uint32_t btdm_cfg_mask = 0;
//if all the bt available memory was already released, cannot initialize bluetooth controller
if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
return ESP_ERR_INVALID_STATE;
}
osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
if (osi_funcs_p == NULL) {
return ESP_ERR_NO_MEM;
@ -1238,11 +1243,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ESP_ERR_INVALID_STATE;
}
//if all the bt available memory was already released, cannot initialize bluetooth controller
if (btdm_dram_available_region[0].mode == ESP_BT_MODE_IDLE) {
return ESP_ERR_INVALID_STATE;
}
if (cfg == NULL) {
return ESP_ERR_INVALID_ARG;
}

@ -1 +1 @@
Subproject commit 6ea00f5c77ba7f65ea0a3626871321d8ea1bebbc
Subproject commit d4ea4de885938c4a14cda1f80cb9b027fb4dc216