Commit 7f91d886 authored by Himadri Pandya's avatar Himadri Pandya Committed by Greg Kroah-Hartman

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: default avatarHimadri Pandya <himadri18.07@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b1cf0b7
......@@ -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__);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment