diff options
author | Shraddha Barke <shraddha.6596@gmail.com> | 2015-09-11 10:40:52 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-12 18:25:00 -0700 |
commit | a544f0edb25fa43c2807c3e21c86bb1f33a2e457 (patch) | |
tree | 1a93abf863886a6dae6f147fcf19069c9775397d /drivers/staging/rtl8188eu | |
parent | a90624cf253cc74e9464b42d54aa4825575edefe (diff) | |
download | lwn-a544f0edb25fa43c2807c3e21c86bb1f33a2e457.tar.gz lwn-a544f0edb25fa43c2807c3e21c86bb1f33a2e457.zip |
Staging: rtl8188eu: core: Remove explicit NULL comparison
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>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c index b340e4a9d540..497fb068fdc8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c @@ -273,7 +273,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta) struct sta_priv *pstapriv = &padapter->stapriv; - if (psta == NULL) + if (!psta) goto exit; pfree_sta_queue = &pstapriv->free_sta_queue; @@ -433,7 +433,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - if (hwaddr == NULL) + if (!hwaddr) return NULL; if (IS_MCAST(hwaddr)) @@ -473,7 +473,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter) psta = rtw_alloc_stainfo(pstapriv, bcast_addr); - if (psta == NULL) { + if (!psta) { res = _FAIL; RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail")); goto exit; |