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
This commit is contained in:
Yu Wang 2020-08-06 15:03:53 +08:00 committed by snandini
parent 68a0b74791
commit 26ce844a25

View File

@ -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)))