From: Himadri Pandya Date: Sun, 17 Mar 2019 06:14:52 +0000 (+0530) Subject: staging: rtl8723bs: hal: Remove comparison to NULL in rtl8723bs_recv.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7f91d8866f93c88765684565fc580a79abe66537;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723bs: hal: Remove comparison to NULL in rtl8723bs_recv.c Remove comparison to NULL in file rtl8723bs_recv.c. Suggested by Coccinelle. Signed-off-by: Himadri Pandya Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c index 26742960ed65..b269de52e535 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c @@ -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__); } }