diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d092dd8b55e3..9326fd93492c 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4873,7 +4873,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx) hdd_stop_all_adapters(hdd_ctx); } - hdd_wlan_stop_modules(hdd_ctx); /* * Close the scheduler before calling cds_close to make sure no thread * is scheduled after the each module close is called i.e after all the @@ -4885,6 +4884,8 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx) QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status)); } + hdd_wlan_stop_modules(hdd_ctx); + qdf_spinlock_destroy(&hdd_ctx->hdd_adapter_lock); qdf_spinlock_destroy(&hdd_ctx->sta_update_info_lock); qdf_spinlock_destroy(&hdd_ctx->connection_status_lock);