From d78d30cb273fa481e567970ce9d4a481c19e4ba5 Mon Sep 17 00:00:00 2001 From: Yun Park Date: Mon, 4 Jan 2016 16:48:19 -0800 Subject: [PATCH] qcacld-3.0: call IPA cleanup when cds_enable failed qcacld-2.0 to qcacld-3.0 propagation When CDS enable fails after IPA init, IPA cleanup is missed. This will cause a system crash later as IPA resource is not properly teared down. Change-Id: I563e92e4ed5319b6489dcc8cffb6a802d54e8549 CRs-fixed: 949015 --- core/hdd/src/wlan_hdd_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b2b86a758f58..cd4e695f1d18 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5068,7 +5068,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc) status = cds_enable(hdd_ctx->pcds_context); if (!CDF_IS_STATUS_SUCCESS(status)) { hddLog(CDF_TRACE_LEVEL_FATAL, FL("cds_enable failed")); - goto err_wiphy_unregister; + goto err_ipa_cleanup; } hdd_init_channel_avoidance(hdd_ctx); @@ -5497,6 +5497,9 @@ err_close_adapter: err_cds_disable: cds_disable(p_cds_context); +err_ipa_cleanup: + hdd_ipa_cleanup(hdd_ctx); + err_wiphy_unregister: wiphy_unregister(wiphy);