qcacmn: htc: Replace explicit comparison to NULL

Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within htc replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Ibb6d24aff9824d7e7cf253c1fe3081443cbfb63b
CRs-Fixed: 2418252
Šī revīzija ir iekļauta:
Jeff Johnson
2019-03-18 09:47:18 -07:00
revīziju iesūtīja nshrivas
vecāks 1fe4511e2e
revīzija 5a6cc79b9e
6 mainīti faili ar 51 papildinājumiem un 51 dzēšanām

Parādīt failu

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -135,7 +135,7 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
/* allocate a packet to send to the target */
pSendPacket = htc_alloc_control_tx_packet(target);
if (NULL == pSendPacket) {
if (!pSendPacket) {
AR_DEBUG_ASSERT(false);
status = QDF_STATUS_E_NOMEM;
break;
@@ -153,7 +153,7 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
pConnectMsg =
(HTC_CONNECT_SERVICE_MSG *) qdf_nbuf_data(netbuf);
if (NULL == pConnectMsg) {
if (!pConnectMsg) {
AR_DEBUG_ASSERT(0);
status = QDF_STATUS_E_FAULT;
break;
@@ -183,7 +183,7 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
disableCreditFlowCtrl = true;
/* check caller if it wants to transfer meta data */
if ((pConnectReq->pMetaData != NULL) &&
if ((pConnectReq->pMetaData) &&
(pConnectReq->MetaDataLength <=
HTC_SERVICE_META_DATA_MAX_LENGTH)) {
/* copy meta data into msg buffer (after hdr) */
@@ -282,7 +282,7 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
assignedEndpoint = (HTC_ENDPOINT_ID) rsp_msg_end_id;
maxMsgSize = rsp_msg_max_msg_size;
if ((pConnectResp->pMetaData != NULL) &&
if ((pConnectResp->pMetaData) &&
(rsp_msg_serv_meta_len > 0) &&
(rsp_msg_serv_meta_len <=
HTC_SERVICE_META_DATA_MAX_LENGTH)) {
@@ -412,7 +412,7 @@ void htc_fw_event_handler(void *context, QDF_STATUS status)
struct htc_init_info *initInfo = &target->HTCInitInfo;
/* check if target failure handler exists and pass error code to it. */
if (target->HTCInitInfo.TargetFailure != NULL)
if (target->HTCInitInfo.TargetFailure)
initInfo->TargetFailure(initInfo->pContext, status);
}