Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.
@@
expression e;
@@
- e == NULL
+ !e
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct hw_xmit *phwxmit;
int i;
- if (psta == NULL)
+ if (!psta)
goto exit;
spin_lock_bh(&psta->lock);
u32 index;
const u8 *addr;
- if (hwaddr == NULL)
+ if (!hwaddr)
return NULL;
if (is_multicast_ether_addr(hwaddr))
int res = _SUCCESS;
psta = rtw_alloc_stainfo23a(pstapriv, bc_addr, GFP_KERNEL);
- if (psta == NULL) {
+ if (!psta) {
res = _FAIL;
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
"rtw_alloc_stainfo23a fail\n");