diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-03-05 16:17:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-12 01:09:09 -0500 |
commit | b747a1e936b614afd4a5ba5b51ae8d00ea53de2c (patch) | |
tree | e8eee837d320602da675c035c627ee4b05aa5399 | |
parent | d31770b32fb40f6087ca9ae7139fedd0d0a27771 (diff) |
staging: rtl8723au: core: rtw_sta_mgt: Change form of NULL comparisons
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>
-rw-r--r-- | drivers/staging/rtl8723au/core/rtw_sta_mgt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c index 5f85ee065779..a9b778c45d44 100644 --- a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c | |||
@@ -200,7 +200,7 @@ int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta) | |||
200 | struct hw_xmit *phwxmit; | 200 | struct hw_xmit *phwxmit; |
201 | int i; | 201 | int i; |
202 | 202 | ||
203 | if (psta == NULL) | 203 | if (!psta) |
204 | goto exit; | 204 | goto exit; |
205 | 205 | ||
206 | spin_lock_bh(&psta->lock); | 206 | spin_lock_bh(&psta->lock); |
@@ -350,7 +350,7 @@ struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr) | |||
350 | u32 index; | 350 | u32 index; |
351 | const u8 *addr; | 351 | const u8 *addr; |
352 | 352 | ||
353 | if (hwaddr == NULL) | 353 | if (!hwaddr) |
354 | return NULL; | 354 | return NULL; |
355 | 355 | ||
356 | if (is_multicast_ether_addr(hwaddr)) | 356 | if (is_multicast_ether_addr(hwaddr)) |
@@ -383,7 +383,7 @@ int rtw_init_bcmc_stainfo23a(struct rtw_adapter *padapter) | |||
383 | int res = _SUCCESS; | 383 | int res = _SUCCESS; |
384 | 384 | ||
385 | psta = rtw_alloc_stainfo23a(pstapriv, bc_addr, GFP_KERNEL); | 385 | psta = rtw_alloc_stainfo23a(pstapriv, bc_addr, GFP_KERNEL); |
386 | if (psta == NULL) { | 386 | if (!psta) { |
387 | res = _FAIL; | 387 | res = _FAIL; |
388 | RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, | 388 | RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, |
389 | "rtw_alloc_stainfo23a fail\n"); | 389 | "rtw_alloc_stainfo23a fail\n"); |