[automerger skipped] Merge Coral/Flame into AOSP master am: 2dd444c395 -s ours am: 8a20d7acc0 -s ours am: 2ec685c0d0 -s ours
am: b01dfec50c -s ours
am skip reason: change_id I911b1a53ec46f39cc7597c2a31f59669db4f0699 with SHA1 e66c67c549 is in history

Change-Id: I580b0d0a3a14cb49e4b4180935b5d671a1d31405
diff --git a/qcwcn/wifi_hal/nan.cpp b/qcwcn/wifi_hal/nan.cpp
index 549b381..ac378fa 100644
--- a/qcwcn/wifi_hal/nan.cpp
+++ b/qcwcn/wifi_hal/nan.cpp
@@ -1260,6 +1260,7 @@
         //error case should not happen print log
         ALOGE("%s: Wrong NAN subcmd received %d", __FUNCTION__, mSubcmd);
     }
+    mNanVendorEvent = NULL;
     return NL_SKIP;
 }
 
diff --git a/qcwcn/wifi_hal/nan_rsp.cpp b/qcwcn/wifi_hal/nan_rsp.cpp
index 721ab49..f0b9b1c 100644
--- a/qcwcn/wifi_hal/nan_rsp.cpp
+++ b/qcwcn/wifi_hal/nan_rsp.cpp
@@ -350,7 +350,7 @@
     char tlvInfo[NAN_ERROR_STR_LEN];
     tlvInfo[0] = '\0';
 
-    if (isNanResponse() || (is_ndp_rsp == true)){
+    if ((is_ndp_rsp == true) || isNanResponse()) {
         pRsp = (NanResponseMsg*)pResponse;
         for (i = 0; i < (int)(sizeof(errorCodeTranslation)/ sizeof(errorCode)); i++) {
             if (errorCodeTranslation[i].firmwareError == firmwareErrorRecvd) {