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 <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8b1cf0b720
commit
7f91d8866f
@ -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__);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user