Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: Replace explicit NULL comparison

Replace explicit NULL comparison with ! operator.
Found with Coccinelle.

@@
expression e;
@@
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Bhaktipriya Shridhar and committed by
Greg Kroah-Hartman
7cb07dc4 8c5af16f

+2 -2
+2 -2
drivers/staging/rtl8712/xmit_linux.c
··· 131 131 132 132 for (i = 0; i < 8; i++) { 133 133 pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL); 134 - if (pxmitbuf->pxmit_urb[i] == NULL) { 134 + if (!pxmitbuf->pxmit_urb[i]) { 135 135 netdev_err(padapter->pnetdev, "pxmitbuf->pxmit_urb[i] == NULL\n"); 136 136 return _FAIL; 137 137 } ··· 171 171 goto _xmit_entry_drop; 172 172 } 173 173 pxmitframe = r8712_alloc_xmitframe(pxmitpriv); 174 - if (pxmitframe == NULL) { 174 + if (!pxmitframe) { 175 175 ret = 0; 176 176 goto _xmit_entry_drop; 177 177 }