staging: rtl8723bs: hal: Remove comparison to NULL in rtl8723bs_recv.c
authorHimadri Pandya <himadri18.07@gmail.com>
Sun, 17 Mar 2019 06:14:52 +0000 (11:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:06:07 +0000 (07:06 +0100)
Remove comparison to NULL in file rtl8723bs_recv.c. Suggested by
Coccinelle.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c

index 26742960ed65cbf157a34923427f45d239b5bc89..b269de52e535d3ee9cd4ca7c5f5fe56a3e2f17a9 100644 (file)
@@ -170,7 +170,7 @@ static void rtl8723bs_c2h_packet_handler(struct adapter *padapter,
        /* DBG_871X("+%s() length =%d\n", __func__, length); */
 
        tmp = rtw_zmalloc(length);
-       if (tmp == NULL)
+       if (!tmp)
                return;
 
        memcpy(tmp, pbuf, length);
@@ -424,7 +424,7 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
 
        n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
        precvpriv->pallocated_recv_buf = rtw_zmalloc(n);
-       if (precvpriv->pallocated_recv_buf == NULL) {
+       if (!precvpriv->pallocated_recv_buf) {
                res = _FAIL;
                RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("alloc recv_buf fail!\n"));
                goto exit;
@@ -439,7 +439,7 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
                if (res == _FAIL)
                        break;
 
-               if (precvbuf->pskb == NULL) {
+               if (!precvbuf->pskb) {
                        SIZE_PTR tmpaddr = 0;
                        SIZE_PTR alignment = 0;
 
@@ -453,7 +453,7 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
                                skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
                        }
 
-                       if (precvbuf->pskb == NULL) {
+                       if (!precvbuf->pskb) {
                                DBG_871X("%s: alloc_skb fail!\n", __func__);
                        }
                }