From 92af4bfb014108fc987b426206480de3b426b6ad Mon Sep 17 00:00:00 2001 From: chenguo Date: Thu, 25 Oct 2018 13:54:58 +0800 Subject: [PATCH] qcacld-3.0: Fix incorrect valid pointer checking There is an incorret valid pointer checking after memory allocation for monitor mode, which will cause net device up failure. Fix this incorrect checking. CRs-Fixed: 2338747 Change-Id: Ib1dd4d85ce7e7cace1167a082c103fb0300eb16a --- core/sme/src/common/sme_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 7ef2f3dadbd3..6de523a9ec75 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -14027,7 +14027,7 @@ QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, tSirMacAddr bss_id, struct sir_create_session *msg; msg = qdf_mem_malloc(sizeof(*msg)); - if (!msg) { + if (msg) { msg->type = eWNI_SME_MON_INIT_SESSION; msg->vdev_id = vdev_id; msg->msg_len = sizeof(*msg);