From 2e71e937073af851b889d8ac0544acc17f996bfe Mon Sep 17 00:00:00 2001 From: Manishekar Chandrasekaran Date: Fri, 24 Jun 2016 02:31:55 +0530 Subject: [PATCH] qcacld-3.0: Check return value during SAP global initialization Check the return value during SAP global initialization to gracefully clean up the re-initialization in case of any error. Change-Id: I216146b4501606a536dffb5a859b43dd2d6989ff CRs-Fixed: 1031855 --- core/hdd/src/wlan_hdd_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 598c3d33b4d7..dc7c45dd9e7d 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1666,7 +1666,9 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc) pHddCtx->target_hw_version, pHddCtx->target_hw_name); #endif - wlansap_global_init(); + qdf_status = wlansap_global_init(); + if (QDF_IS_STATUS_ERROR(qdf_status)) + goto err_cds_disable; hddLog(LOGE, "%s: WLAN host driver reinitiation completed!", __func__);