Commit 58ff7e7a authored by Payal Kshirsagar's avatar Payal Kshirsagar Committed by Greg Kroah-Hartman

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: default avatarPayal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab6426e3
...@@ -95,7 +95,7 @@ static void _free_network(struct mlme_priv *pmlmepriv, ...@@ -95,7 +95,7 @@ static void _free_network(struct mlme_priv *pmlmepriv,
unsigned long irqL; unsigned long irqL;
struct __queue *free_queue = &(pmlmepriv->free_bss_pool); struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
if (pnetwork == NULL) if (!pnetwork)
return; return;
if (pnetwork->fixed) if (pnetwork->fixed)
return; return;
...@@ -115,7 +115,7 @@ static void free_network_nolock(struct mlme_priv *pmlmepriv, ...@@ -115,7 +115,7 @@ static void free_network_nolock(struct mlme_priv *pmlmepriv,
{ {
struct __queue *free_queue = &pmlmepriv->free_bss_pool; struct __queue *free_queue = &pmlmepriv->free_bss_pool;
if (pnetwork == NULL) if (!pnetwork)
return; return;
if (pnetwork->fixed) if (pnetwork->fixed)
return; return;
...@@ -399,7 +399,7 @@ static void update_scanned_network(struct _adapter *adapter, ...@@ -399,7 +399,7 @@ static void update_scanned_network(struct _adapter *adapter,
/* Otherwise just pull from the free list */ /* Otherwise just pull from the free list */
/* update scan_time */ /* update scan_time */
pnetwork = alloc_network(pmlmepriv); pnetwork = alloc_network(pmlmepriv);
if (pnetwork == NULL) if (!pnetwork)
return; return;
bssid_ex_sz = r8712_get_wlan_bssid_ex_sz(target); bssid_ex_sz = r8712_get_wlan_bssid_ex_sz(target);
target->Length = bssid_ex_sz; target->Length = bssid_ex_sz;
...@@ -1120,7 +1120,7 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv) ...@@ -1120,7 +1120,7 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
} }
pnetwork = container_of(pmlmepriv->pscanned, pnetwork = container_of(pmlmepriv->pscanned,
struct wlan_network, list); struct wlan_network, list);
if (pnetwork == NULL) if (!pnetwork)
return _FAIL; return _FAIL;
pmlmepriv->pscanned = pmlmepriv->pscanned->next; pmlmepriv->pscanned = pmlmepriv->pscanned->next;
if (pmlmepriv->assoc_by_bssid) { if (pmlmepriv->assoc_by_bssid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment