瀏覽代碼

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 年之前
父節點
當前提交
1da105c70d
共有 1 個文件被更改,包括 3 次插入3 次删除
  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;
 	}