From 86239106dc8cb3d8caa42d8813800aa02db39dad Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 10 Oct 2017 13:29:38 -0700 Subject: qcacld-3.0: Move cds_config cleanup into start modules In the event of an error during cds_open, the cds config is not released until very late in error handing process. Instead, release the cds config immediately after an error occurs in cds_open. Change-Id: I5fdf446c3cad82cbe3cbdec40f1dce4b46a0c3fb CRs-Fixed: 2124189 --- core/hdd/src/wlan_hdd_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 35ba276e7842..f10b323e1635 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2103,7 +2103,7 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, status = cds_open(); if (!QDF_IS_STATUS_SUCCESS(status)) { hdd_err("Failed to Open CDS: %d", status); - goto ol_cds_free; + goto deinit_config; } hdd_ctx->hHal = cds_get_context(QDF_MODULE_ID_SME); @@ -2179,6 +2179,9 @@ close: hdd_ctx->driver_status = DRIVER_MODULES_CLOSED; cds_close(p_cds_context); +deinit_config: + cds_deinit_ini_config(); + ol_cds_free: ol_cds_free(); @@ -10030,7 +10033,6 @@ err_exit_nl_srv: hdd_green_ap_deinit(hdd_ctx); hdd_exit_netlink_services(hdd_ctx); - cds_deinit_ini_config(); err_hdd_free_context: if (cds_is_fw_down()) hdd_err("Not setting the complete event as fw is down"); -- cgit v1.2.3