diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-02-19 00:24:30 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-20 15:18:33 -0800 |
commit | 7cb07dc4e4431546979242f86f4cf5af233bb860 (patch) | |
tree | 3081842d488be49f264accf66f8da10913110dad /drivers | |
parent | 8c5af16f7953edb709d2f93ce69ea9da7dbfab40 (diff) | |
download | linux-7cb07dc4e4431546979242f86f4cf5af233bb860.tar.bz2 |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8712/xmit_linux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c index d3981836ce26..f8866d7aa668 100644 --- a/drivers/staging/rtl8712/xmit_linux.c +++ b/drivers/staging/rtl8712/xmit_linux.c @@ -131,7 +131,7 @@ int r8712_xmit_resource_alloc(struct _adapter *padapter, for (i = 0; i < 8; i++) { pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL); - if (pxmitbuf->pxmit_urb[i] == NULL) { + if (!pxmitbuf->pxmit_urb[i]) { netdev_err(padapter->pnetdev, "pxmitbuf->pxmit_urb[i] == NULL\n"); return _FAIL; } @@ -171,7 +171,7 @@ int r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev) goto _xmit_entry_drop; } pxmitframe = r8712_alloc_xmitframe(pxmitpriv); - if (pxmitframe == NULL) { + if (!pxmitframe) { ret = 0; goto _xmit_entry_drop; } |