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>
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;
}
goto _xmit_entry_drop;
}
pxmitframe = r8712_alloc_xmitframe(pxmitpriv);
- if (pxmitframe == NULL) {
+ if (!pxmitframe) {
ret = 0;
goto _xmit_entry_drop;
}