summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHouston Hoffman <hhoffman@codeaurora.org>2016-10-10 16:40:44 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-20 16:04:23 -0700
commitfeb36ba5b1cffff5b7c2c7318023738c335d597a (patch)
tree8074dacdff1970acc127b34ed5e82413e277f79d
parent550c29e6f1ca4e8fbe93bfb10506eff20ce02593 (diff)
qcacld-3.0: Continue cds_deinit_policy_mgr 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. Change-Id: If132c40dffc801972ba801bb4a269b5dd9b954ff CRs-Fixed: 1079503
-rw-r--r--core/cds/src/cds_concurrency.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index e8426415a1ee..a23a56b51ef7 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -3958,23 +3958,27 @@ static void cds_dbs_opportunistic_timer_handler(void *data)
QDF_STATUS cds_deinit_policy_mgr(void)
{
cds_context_type *cds_ctx;
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
if (!cds_ctx) {
cds_err("Invalid CDS Context");
- return QDF_STATUS_E_FAILURE;
+ status = QDF_STATUS_E_FAILURE;
+ QDF_ASSERT(0);
}
if (!QDF_IS_STATUS_SUCCESS(qdf_event_destroy
(&cds_ctx->connection_update_done_evt))) {
cds_err("Failed to destroy connection_update_done_evt");
- return QDF_STATUS_E_FAILURE;
+ status = QDF_STATUS_E_FAILURE;
+ QDF_ASSERT(0);
}
if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_destroy(
&cds_ctx->qdf_conc_list_lock))) {
cds_err("Failed to destroy qdf_conc_list_lock");
- return QDF_STATUS_E_FAILURE;
+ status = QDF_STATUS_E_FAILURE;
+ QDF_ASSERT(0);
}
if (QDF_TIMER_STATE_RUNNING ==
@@ -3986,7 +3990,8 @@ QDF_STATUS cds_deinit_policy_mgr(void)
if (!QDF_IS_STATUS_SUCCESS(qdf_mc_timer_destroy(
&cds_ctx->dbs_opportunistic_timer))) {
cds_err("Cannot deallocate dbs opportunistic timer");
- return QDF_STATUS_E_FAILURE;
+ status = QDF_STATUS_E_FAILURE;
+ QDF_ASSERT(0);
}
cds_ctx->sme_get_valid_channels = NULL;
@@ -3994,10 +3999,11 @@ QDF_STATUS cds_deinit_policy_mgr(void)
if (QDF_IS_STATUS_ERROR(cds_reset_sap_mandatory_channels())) {
cds_err("failed to reset sap mandatory channels");
- return QDF_STATUS_E_FAILURE;
+ status = QDF_STATUS_E_FAILURE;
+ QDF_ASSERT(0);
}
- return QDF_STATUS_SUCCESS;
+ return status;
}
/**