Ver código fonte

qcacld-3.0: mlme: 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 mlme replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Iac19509c5fdcce036e0288653d61638cf04f01d6
CRs-Fixed: 2418400
Jeff Johnson 6 anos atrás
pai
commit
1da105c70d
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      components/mlme/dispatcher/src/wlan_mlme_api.c

+ 3 - 3
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -1945,7 +1945,7 @@ QDF_STATUS wlan_mlme_set_rts_threshold(struct wlan_objmgr_psoc *psoc,
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (NULL == wma_handle) {
+	if (!wma_handle) {
 		WMA_LOGE("%s: wma_handle is NULL", __func__);
 		return QDF_STATUS_E_INVAL;
 	}
@@ -1983,7 +1983,7 @@ QDF_STATUS wlan_mlme_set_frag_threshold(struct wlan_objmgr_psoc *psoc,
 
 	wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
 
-	if (NULL == wma_handle) {
+	if (!wma_handle) {
 		WMA_LOGE("%s: wma_handle is NULL", __func__);
 		return QDF_STATUS_E_INVAL;
 	}
@@ -2256,7 +2256,7 @@ QDF_STATUS mlme_get_wep_key(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_INVAL;
 	}
 	crypto_key = wlan_crypto_get_key(vdev, wep_keyid);
-	if (crypto_key == NULL) {
+	if (!crypto_key) {
 		mlme_err("Crypto KEY not present");
 		return QDF_STATUS_E_INVAL;
 	}