Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_priv *pstapriv = &padapter->stapriv;
goto exit;
pfree_sta_queue = &pstapriv->free_sta_queue;
goto exit;
pfree_sta_queue = &pstapriv->free_sta_queue;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
return NULL;
if (IS_MCAST(hwaddr))
return NULL;
if (IS_MCAST(hwaddr))
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
res = _FAIL;
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail"));
goto exit;
res = _FAIL;
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail"));
goto exit;