Răsfoiți Sursa

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

Change-Id: I45c4869708d81fd484a5b05196d274cc648f8e7b
CRs-Fixed: 2418260
Jeff Johnson 6 ani în urmă
părinte
comite
2e42a9e61c
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      wlan_cfg/wlan_cfg.c

+ 2 - 2
wlan_cfg/wlan_cfg.c

@@ -251,7 +251,7 @@ struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void *psoc)
 	struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx =
 		qdf_mem_malloc(sizeof(struct wlan_cfg_dp_soc_ctxt));
 
-	if (wlan_cfg_ctx == NULL)
+	if (!wlan_cfg_ctx)
 		return NULL;
 
 	wlan_cfg_ctx->rxdma1_enable = WLAN_CFG_RXDMA1_ENABLE;
@@ -382,7 +382,7 @@ struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_attach(void *psoc)
 	struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_ctx =
 		qdf_mem_malloc(sizeof(struct wlan_cfg_dp_pdev_ctxt));
 
-	if (wlan_cfg_ctx == NULL)
+	if (!wlan_cfg_ctx)
 		return NULL;
 
 	wlan_cfg_ctx->rx_dma_buf_ring_size = cfg_get(psoc,