From da0262a36ff49a0ea00bad002d3d784c12e5f424 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Fri, 24 Aug 2018 16:29:37 -0700 Subject: [PATCH] qcacld-3.0: Add mac_open() error handling The error handling in cds_open(), in the event that the call to mac_open() fails, is currently stubbed out. Add appropriate error handling for this case by referencing cds_open() and cds_close(). Change-Id: I6103050d5f2323250c9254a5a3add01fd0d34de3 CRs-Fixed: 2302968 --- core/cds/src/cds_api.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 38345b633d75..2bd37d5207be 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -690,15 +690,19 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc) err_mac_close: mac_close(mac_handle); + gp_cds_context->mac_context = NULL; err_soc_detach: - /* todo: add propper error handling */ + cdp_soc_detach(gp_cds_context->dp_soc); + + ucfg_ocb_update_dp_handle(psoc, NULL); + pmo_ucfg_psoc_update_dp_handle(psoc, NULL); + wlan_psoc_set_dp_handle(psoc, NULL); + err_wma_close: cds_shutdown_notifier_purge(); wma_close(); wma_wmi_service_close(); - pmo_ucfg_psoc_update_dp_handle(psoc, NULL); - wlan_psoc_set_dp_handle(psoc, NULL); err_htc_close: if (gp_cds_context->htc_ctx) {