Skip to content

Commit

Permalink
[ESP32] remove error check on nimble_port_deinit()
Browse files Browse the repository at this point in the history
IDF prior to v5.0, nimble_port_deinit() have a return type as void.
  • Loading branch information
shubhamdp committed Apr 29, 2024
1 parent 7a408bd commit 80f0f75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/ESP32/nimble/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,11 +1025,11 @@ void BLEManagerImpl::ClaimBLEMemory(System::Layer *, void *)

CHIP_ERROR BLEManagerImpl::DeinitBLE()
{
esp_err_t err = ESP_OK;
VerifyOrReturnError(ble_hs_is_enabled(), CHIP_ERROR_INCORRECT_STATE, ChipLogProgress(DeviceLayer, "BLE already deinited"));
VerifyOrReturnError(0 == nimble_port_stop(), MapBLEError(ESP_FAIL), ChipLogError(DeviceLayer, "nimble_port_stop() failed"));

esp_err_t err = nimble_port_deinit();
VerifyOrReturnError(err == ESP_OK, MapBLEError(err));
nimble_port_deinit();

#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
err = esp_nimble_hci_and_controller_deinit();
Expand Down

0 comments on commit 80f0f75

Please sign in to comment.