From 2e42a9e61cf92b0ce2b25aeacd7fcd4256b02464 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 18 Mar 2019 09:53:22 -0700 Subject: [PATCH] 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 --- wlan_cfg/wlan_cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index c6c3d271e38d..46a3d0185009 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/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,