From 6640cf3cbef260802b1b9032d52dcc833e0b696a Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Mon, 10 Oct 2016 16:44:29 -0700 Subject: [PATCH] qcacld-3.0: Continue hdd_deconfigure_cds despite failures Cleanup should ignore errors without modifying execution as much as possible. If one item was not initialized propperly the driver should still try to cleanup the rest. Also continue the driver unload when this api returns an error. Change-Id: Ifdda135fe1baaad39c14c1e3d0843ccf964554e0 CRs-Fixed: 1079503 --- core/hdd/src/wlan_hdd_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b0d34fa9b0e3..97213841f769 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7711,6 +7711,7 @@ out: static int hdd_deconfigure_cds(hdd_context_t *hdd_ctx) { QDF_STATUS qdf_status; + int ret = 0; ENTER(); /* De-register the SME callbacks */ @@ -7721,18 +7722,18 @@ static int hdd_deconfigure_cds(hdd_context_t *hdd_ctx) if (!QDF_IS_STATUS_SUCCESS(cds_deinit_policy_mgr())) { hdd_err("Failed to deinit policy manager"); /* Proceed and complete the clean up */ - return -EINVAL; + ret = -EINVAL; } qdf_status = cds_disable(hdd_ctx->pcds_context); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Failed to Disable the CDS Modules! :%d", qdf_status); - return -EINVAL; + ret = -EINVAL; } EXIT(); - return 0; + return ret; } @@ -7786,7 +7787,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx) hdd_alert("Failed to de-configure CDS"); QDF_ASSERT(0); ret = -EINVAL; - goto done; } hdd_info("successfully Disabled the CDS modules!"); hdd_ctx->driver_status = DRIVER_MODULES_OPENED; @@ -7815,7 +7815,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx) if (!hif_ctx) { hdd_err("Hif context is Null"); ret = -EINVAL; - goto done; } hdd_hif_close(hif_ctx);