_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);
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;
}
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;
}
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*/