diff options
author | Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> | 2019-04-02 20:54:13 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-02 19:57:11 +0200 |
commit | 58ff7e7aaa513a3aad257d2a083586f3b3fdb6df (patch) | |
tree | 6de42a1d5c042ac309573fa1f6146aeda904aafa | |
parent | ab6426e3353ac9731f92218ccf4f36bb8d933407 (diff) |
staging: rtl8712: rtl871x_mlme.c: use !x in place of NULL comparison
Challenge suggested by coccinelle.
Avoid NULL comparison, compare using boolean operator.
Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mlme.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index c666e038f43e..e370841a79ca 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -95,7 +95,7 @@ static void _free_network(struct mlme_priv *pmlmepriv, unsigned long irqL; struct __queue *free_queue = &(pmlmepriv->free_bss_pool); - if (pnetwork == NULL) + if (!pnetwork) return; if (pnetwork->fixed) return; @@ -115,7 +115,7 @@ static void free_network_nolock(struct mlme_priv *pmlmepriv, { struct __queue *free_queue = &pmlmepriv->free_bss_pool; - if (pnetwork == NULL) + if (!pnetwork) return; if (pnetwork->fixed) return; @@ -399,7 +399,7 @@ static void update_scanned_network(struct _adapter *adapter, /* Otherwise just pull from the free list */ /* update scan_time */ pnetwork = alloc_network(pmlmepriv); - if (pnetwork == NULL) + if (!pnetwork) return; bssid_ex_sz = r8712_get_wlan_bssid_ex_sz(target); target->Length = bssid_ex_sz; @@ -1120,7 +1120,7 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv) } pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list); - if (pnetwork == NULL) + if (!pnetwork) return _FAIL; pmlmepriv->pscanned = pmlmepriv->pscanned->next; if (pmlmepriv->assoc_by_bssid) { |