summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <rajekuma@codeaurora.org>2017-12-19 16:17:42 -0800
committersnandini <snandini@codeaurora.org>2017-12-20 18:36:36 -0800
commite75bebdca21b45af7a3ef8127d08e8ce4ed46225 (patch)
treee07f7ee43666075445c9d400eb300802c10d10b5
parentb6c6a47fee03a418bf7f38fcedd1ae4f173730a8 (diff)
qcacld-3.0: Avoid qdf_mem_cpy when source pointer is null
During SAP SSR scan default ie data pointer is cleared and set to null hence avoid unnecessary qdf_mem_cpy when source pointer is null. Change-Id: I75960c69804144abee5b1978b43002110b0d0be4 CRs-Fixed: 2161056
-rw-r--r--core/sme/src/common/sme_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 6a87c40dc9a6..8d7d0540545c 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -17306,6 +17306,9 @@ QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id,
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
struct hdd_default_scan_ie *set_ie_params;
+ if (!ie_data)
+ return QDF_STATUS_E_INVAL;
+
status = sme_acquire_global_lock(&mac_ctx->sme);
if (QDF_IS_STATUS_SUCCESS(status)) {
set_ie_params = qdf_mem_malloc(sizeof(*set_ie_params));