From 26ce844a2583a7795ed9c297e47591337b0b4dd7 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Thu, 6 Aug 2020 15:03:53 +0800 Subject: [PATCH] qcacld-3.0: skip sap context destroy if it's NULL The sap context is NULL when sap adapter is not started, skip context destroy for such case, to avoid error level output. CRs-Fixed: 2749376 Change-Id: I190a3e75187be6b6d70f5a70c71c87e563cd3f15 --- core/hdd/src/wlan_hdd_hostapd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 548e1b8a2d..bd241dd762 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -3446,6 +3446,11 @@ bool hdd_sap_destroy_ctx(struct hdd_adapter *adapter) adapter->session.ap.beacon = NULL; } + if (!sap_ctx) { + hdd_debug("sap context is NULL"); + return true; + } + hdd_debug("destroying sap context"); if (QDF_IS_STATUS_ERROR(sap_destroy_ctx(sap_ctx)))