Commit a667dbce authored by Sandhya Bankar's avatar Sandhya Bankar Committed by Greg Kroah-Hartman

Staging: rtl8712: rtl8712_recv: Use !x instead of x == NULL

Use !x instead of x == NULL. This patch was found by checkpatch.
Signed-off-by: default avatarSandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c43fcdd4
......@@ -60,7 +60,7 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
_init_queue(&precvpriv->free_recv_buf_queue);
precvpriv->pallocated_recv_buf =
kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4, GFP_ATOMIC);
if (precvpriv->pallocated_recv_buf == NULL)
if (!precvpriv->pallocated_recv_buf)
return _FAIL;
precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 -
((addr_t) (precvpriv->pallocated_recv_buf) & 3);
......@@ -274,7 +274,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
fragnum = pfhdr->attrib.frag_num;
psta_addr = pfhdr->attrib.ta;
psta = r8712_get_stainfo(pstapriv, psta_addr);
if (psta == NULL)
if (!psta)
pdefrag_q = NULL;
else
pdefrag_q = &psta->sta_recvpriv.defrag_q;
......@@ -999,15 +999,15 @@ int recv_func(struct _adapter *padapter, void *pcontext)
}
process_phy_info(padapter, prframe);
prframe = r8712_decryptor(padapter, prframe);
if (prframe == NULL) {
if (!prframe) {
retval = _FAIL;
goto _exit_recv_func;
}
prframe = r8712_recvframe_chk_defrag(padapter, prframe);
if (prframe == NULL)
if (!prframe)
goto _exit_recv_func;
prframe = r8712_portctrl(padapter, prframe);
if (prframe == NULL) {
if (!prframe) {
retval = _FAIL;
goto _exit_recv_func;
}
......@@ -1065,7 +1065,7 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb)
if ((le32_to_cpu(prxstat->rxdw0) >> 23) & 0x01)
shift_sz = 2;
precvframe = r8712_alloc_recvframe(pfree_recv_queue);
if (precvframe == NULL)
if (!precvframe)
goto _exit_recvbuf2recvframe;
INIT_LIST_HEAD(&precvframe->u.hdr.list);
precvframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf*/
......
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