Don't close hal in case of invalid response from NFCC,
instead return error.

Bug: 38039279
Bug: 37988526
Test: Run vts-test
Change-Id: Ie7e6fbdcd2c1aeddf9e093cf3328e20b4229bd8a
diff --git a/halimpl/pn54x/hal/phNxpNciHal.c b/halimpl/pn54x/hal/phNxpNciHal.c
index 4ccc873..a90622a 100644
--- a/halimpl/pn54x/hal/phNxpNciHal.c
+++ b/halimpl/pn54x/hal/phNxpNciHal.c
@@ -40,6 +40,7 @@
 static uint8_t fw_download_success = 0;
 
 static uint8_t config_access = false;
+static uint8_t config_success = true;
 /* NCI HAL Control structure */
 phNxpNciHal_Control_t nxpncihal_ctrl;
 
@@ -977,7 +978,7 @@
       0x20, 0x02, 0x05, 0x01, 0xA0, 0x91, 0x01, 0x01};
   static uint8_t swp_switch_timeout_cmd[] = {0x20, 0x02, 0x06, 0x01, 0xA0,
                                              0xF3, 0x02, 0x00, 0x00};
-
+  config_success = true;
   uint8_t* buffer = NULL;
   long bufflen = 260;
   long retlen = 0;
@@ -1680,6 +1681,7 @@
     }
   }
 
+  if (config_success == false) return NFCSTATUS_FAILED;
 #ifdef PN547C2_CLOCK_SETTING
   if (isNxpConfigModified()) {
     updateNxpConfigTimestamp();
@@ -2504,8 +2506,8 @@
 
   if (p_rx_data[2] && (config_access == true)) {
     if (p_rx_data[3] != NFCSTATUS_SUCCESS) {
-      NXPLOG_NCIHAL_W("Invalid Data from config file . Aborting..");
-      phNxpNciHal_close();
+      NXPLOG_NCIHAL_W("Invalid Data from config file.");
+      config_success = false;
     }
   }
 }