ESP_WIFI: Remove static analysis warnings

This commit is contained in:
Kapil Gupta
2021-11-10 11:48:00 +05:30
parent 9ee974e626
commit d3542495ab
24 changed files with 224 additions and 262 deletions

View File

@@ -257,17 +257,23 @@ static bool bss_profile_match(u8 *sender)
}
#endif
void esp_supplicant_common_init(struct wpa_funcs *wpa_cb)
int esp_supplicant_common_init(struct wpa_funcs *wpa_cb)
{
struct wpa_supplicant *wpa_s = &g_wpa_supp;
int ret;
s_supplicant_evt_queue = xQueueCreate(3, sizeof(supplicant_event_t));
xTaskCreate(btm_rrm_task, "btm_rrm_t", SUPPLICANT_TASK_STACK_SIZE, NULL, 2, s_supplicant_task_hdl);
ret = xTaskCreate(btm_rrm_task, "btm_rrm_t", SUPPLICANT_TASK_STACK_SIZE, NULL, 2, s_supplicant_task_hdl);
if (ret != pdPASS) {
wpa_printf(MSG_ERROR, "btm: failed to create task");
return ret;
}
s_supplicant_api_lock = xSemaphoreCreateRecursiveMutex();
if (!s_supplicant_api_lock) {
wpa_printf(MSG_ERROR, "esp_supplicant_common_init: failed to create Supplicant API lock");
return;
esp_supplicant_common_deinit();
wpa_printf(MSG_ERROR, "%s: failed to create Supplicant API lock", __func__);
return ret;
}
esp_scan_init(wpa_s);
@@ -291,6 +297,7 @@ void esp_supplicant_common_init(struct wpa_funcs *wpa_cb)
#else
wpa_cb->wpa_sta_profile_match = NULL;
#endif
return 0;
}
void esp_supplicant_common_deinit(void)