diff options
author | Sandhya Bankar <bankarsandhya512@gmail.com> | 2016-09-20 05:04:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-20 07:38:00 -0400 |
commit | a667dbce78d115396cf3b3d1c6d3c6001865ea29 (patch) | |
tree | c826458fecc1a82ba72927052fd65a208ef2290b /drivers/staging | |
parent | c43fcdd4434b7afef7f37bdad1c51b877cffc4ce (diff) |
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: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_recv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index 4027d1a18415..66f0e0a35167 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c | |||
@@ -60,7 +60,7 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter) | |||
60 | _init_queue(&precvpriv->free_recv_buf_queue); | 60 | _init_queue(&precvpriv->free_recv_buf_queue); |
61 | precvpriv->pallocated_recv_buf = | 61 | precvpriv->pallocated_recv_buf = |
62 | kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4, GFP_ATOMIC); | 62 | kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4, GFP_ATOMIC); |
63 | if (precvpriv->pallocated_recv_buf == NULL) | 63 | if (!precvpriv->pallocated_recv_buf) |
64 | return _FAIL; | 64 | return _FAIL; |
65 | precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 - | 65 | precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 - |
66 | ((addr_t) (precvpriv->pallocated_recv_buf) & 3); | 66 | ((addr_t) (precvpriv->pallocated_recv_buf) & 3); |
@@ -274,7 +274,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter, | |||
274 | fragnum = pfhdr->attrib.frag_num; | 274 | fragnum = pfhdr->attrib.frag_num; |
275 | psta_addr = pfhdr->attrib.ta; | 275 | psta_addr = pfhdr->attrib.ta; |
276 | psta = r8712_get_stainfo(pstapriv, psta_addr); | 276 | psta = r8712_get_stainfo(pstapriv, psta_addr); |
277 | if (psta == NULL) | 277 | if (!psta) |
278 | pdefrag_q = NULL; | 278 | pdefrag_q = NULL; |
279 | else | 279 | else |
280 | pdefrag_q = &psta->sta_recvpriv.defrag_q; | 280 | pdefrag_q = &psta->sta_recvpriv.defrag_q; |
@@ -999,15 +999,15 @@ int recv_func(struct _adapter *padapter, void *pcontext) | |||
999 | } | 999 | } |
1000 | process_phy_info(padapter, prframe); | 1000 | process_phy_info(padapter, prframe); |
1001 | prframe = r8712_decryptor(padapter, prframe); | 1001 | prframe = r8712_decryptor(padapter, prframe); |
1002 | if (prframe == NULL) { | 1002 | if (!prframe) { |
1003 | retval = _FAIL; | 1003 | retval = _FAIL; |
1004 | goto _exit_recv_func; | 1004 | goto _exit_recv_func; |
1005 | } | 1005 | } |
1006 | prframe = r8712_recvframe_chk_defrag(padapter, prframe); | 1006 | prframe = r8712_recvframe_chk_defrag(padapter, prframe); |
1007 | if (prframe == NULL) | 1007 | if (!prframe) |
1008 | goto _exit_recv_func; | 1008 | goto _exit_recv_func; |
1009 | prframe = r8712_portctrl(padapter, prframe); | 1009 | prframe = r8712_portctrl(padapter, prframe); |
1010 | if (prframe == NULL) { | 1010 | if (!prframe) { |
1011 | retval = _FAIL; | 1011 | retval = _FAIL; |
1012 | goto _exit_recv_func; | 1012 | goto _exit_recv_func; |
1013 | } | 1013 | } |
@@ -1065,7 +1065,7 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb) | |||
1065 | if ((le32_to_cpu(prxstat->rxdw0) >> 23) & 0x01) | 1065 | if ((le32_to_cpu(prxstat->rxdw0) >> 23) & 0x01) |
1066 | shift_sz = 2; | 1066 | shift_sz = 2; |
1067 | precvframe = r8712_alloc_recvframe(pfree_recv_queue); | 1067 | precvframe = r8712_alloc_recvframe(pfree_recv_queue); |
1068 | if (precvframe == NULL) | 1068 | if (!precvframe) |
1069 | goto _exit_recvbuf2recvframe; | 1069 | goto _exit_recvbuf2recvframe; |
1070 | INIT_LIST_HEAD(&precvframe->u.hdr.list); | 1070 | INIT_LIST_HEAD(&precvframe->u.hdr.list); |
1071 | precvframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf*/ | 1071 | precvframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf*/ |