mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-26 15:14:02 +00:00
staging: replace explicit NULL comparison
Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0
This commit is contained in:
parent
c18b6668eb
commit
0a4ce9dddc
@ -132,7 +132,7 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u3
|
||||
int i;
|
||||
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]) {
|
||||
RTW_INFO("pxmitbuf->pxmit_urb[i]==NULL");
|
||||
return _FAIL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user