Handle_ScanDone(hif_drv, SCAN_EVENT_ABORTED);
}
- if (pstrHostIFscanAttr->ch_freq_list != NULL) {
- kfree(pstrHostIFscanAttr->ch_freq_list);
- pstrHostIFscanAttr->ch_freq_list = NULL;
- }
+ kfree(pstrHostIFscanAttr->ch_freq_list);
+ pstrHostIFscanAttr->ch_freq_list = NULL;
- if (pstrHostIFscanAttr->ies != NULL) {
- kfree(pstrHostIFscanAttr->ies);
- pstrHostIFscanAttr->ies = NULL;
- }
- if (pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo != NULL) {
- kfree(pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo);
- pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo = NULL;
- }
+ kfree(pstrHostIFscanAttr->ies);
+ pstrHostIFscanAttr->ies = NULL;
+ kfree(pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo);
+ pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo = NULL;
- if (pu8HdnNtwrksWidVal != NULL)
- kfree(pu8HdnNtwrksWidVal);
+ kfree(pu8HdnNtwrksWidVal);
return s32Error;
}
NULL,
pstrHostIFconnectAttr->arg);
hif_drv->enuHostIFstate = HOST_IF_IDLE;
- if (strConnectInfo.pu8ReqIEs != NULL) {
- kfree(strConnectInfo.pu8ReqIEs);
- strConnectInfo.pu8ReqIEs = NULL;
- }
+ kfree(strConnectInfo.pu8ReqIEs);
+ strConnectInfo.pu8ReqIEs = NULL;
} else {
PRINT_ER("Connect callback function pointer is NULL\n");
}
PRINT_D(HOSTINF_DBG, "Deallocating connection parameters\n");
- if (pstrHostIFconnectAttr->bssid != NULL) {
- kfree(pstrHostIFconnectAttr->bssid);
- pstrHostIFconnectAttr->bssid = NULL;
- }
+ kfree(pstrHostIFconnectAttr->bssid);
+ pstrHostIFconnectAttr->bssid = NULL;
- if (pstrHostIFconnectAttr->ssid != NULL) {
- kfree(pstrHostIFconnectAttr->ssid);
- pstrHostIFconnectAttr->ssid = NULL;
- }
+ kfree(pstrHostIFconnectAttr->ssid);
+ pstrHostIFconnectAttr->ssid = NULL;
- if (pstrHostIFconnectAttr->ies != NULL) {
- kfree(pstrHostIFconnectAttr->ies);
- pstrHostIFconnectAttr->ies = NULL;
- }
+ kfree(pstrHostIFconnectAttr->ies);
+ pstrHostIFconnectAttr->ies = NULL;
- if (pu8CurrByte != NULL)
- kfree(pu8CurrByte);
+ kfree(pu8CurrByte);
return s32Error;
}
NULL,
hif_drv->strWILC_UsrConnReq.u32UserConnectPvoid);
- if (strConnectInfo.pu8ReqIEs != NULL) {
- kfree(strConnectInfo.pu8ReqIEs);
- strConnectInfo.pu8ReqIEs = NULL;
- }
+ kfree(strConnectInfo.pu8ReqIEs);
+ strConnectInfo.pu8ReqIEs = NULL;
} else {
PRINT_ER("Connect callback function pointer is NULL\n");
}
}
done:
- if (pstrRcvdNetworkInfo->buffer != NULL) {
- kfree(pstrRcvdNetworkInfo->buffer);
- pstrRcvdNetworkInfo->buffer = NULL;
- }
+ kfree(pstrRcvdNetworkInfo->buffer);
+ pstrRcvdNetworkInfo->buffer = NULL;
if (pstrNetworkInfo != NULL) {
DeallocateNetworkInfo(pstrNetworkInfo);
gbScanWhileConnected = false;
}
- if (strConnectInfo.pu8RespIEs != NULL) {
- kfree(strConnectInfo.pu8RespIEs);
- strConnectInfo.pu8RespIEs = NULL;
- }
+ kfree(strConnectInfo.pu8RespIEs);
+ strConnectInfo.pu8RespIEs = NULL;
- if (strConnectInfo.pu8ReqIEs != NULL) {
- kfree(strConnectInfo.pu8ReqIEs);
- strConnectInfo.pu8ReqIEs = NULL;
- }
+ kfree(strConnectInfo.pu8ReqIEs);
+ strConnectInfo.pu8ReqIEs = NULL;
hif_drv->strWILC_UsrConnReq.ssidLen = 0;
kfree(hif_drv->strWILC_UsrConnReq.pu8ssid);
kfree(hif_drv->strWILC_UsrConnReq.pu8bssid);
}
- if (pstrRcvdGnrlAsyncInfo->buffer != NULL) {
- kfree(pstrRcvdGnrlAsyncInfo->buffer);
- pstrRcvdGnrlAsyncInfo->buffer = NULL;
- }
+ kfree(pstrRcvdGnrlAsyncInfo->buffer);
+ pstrRcvdGnrlAsyncInfo->buffer = NULL;
return s32Error;
}
s32Error = send_config_pkt(SET_CFG, &strWID, 1,
get_id_from_handler(hif_drv));
- if (strWID.val != NULL)
- kfree(strWID.val);
+ kfree(strWID.val);
return s32Error;
PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
- if (strWID.val != NULL)
- kfree(strWID.val);
+ kfree(strWID.val);
up(&hWaitResponse);
ERRORHANDLER:
if (s32Error) {
- if (pstrSetBeaconParam->head != NULL)
- kfree(pstrSetBeaconParam->head);
+ kfree(pstrSetBeaconParam->head);
- if (pstrSetBeaconParam->tail != NULL)
- kfree(pstrSetBeaconParam->tail);
+ kfree(pstrSetBeaconParam->tail);
}
return s32Error;