summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHimadri Pandya <himadri18.07@gmail.com>2019-04-03 19:08:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-16 14:31:58 +0300
commit391f544e355d442c8a58d395ef64d01dea47ac8d (patch)
treebcf494dd8354ffe37873d034439ebc3b78969af6 /drivers
parent060ea4271a82270be6d44e8e9aefe8f155fb5626 (diff)
downloadlinux-391f544e355d442c8a58d395ef64d01dea47ac8d.tar.xz
staging: rtl8712: remove unnecessary NULL check
List wlan_network is built properly with init_list_head and list_add_tail which cancels out its probability of being NULL because of the precence of list_head at the top of this structure. Hence, the NULL test can be omitted. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8712/rtl871x_mlme.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index e370841a79ca..7c7267d0fc9e 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -1120,8 +1120,6 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
}
pnetwork = container_of(pmlmepriv->pscanned,
struct wlan_network, list);
- if (!pnetwork)
- return _FAIL;
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
if (pmlmepriv->assoc_by_bssid) {
dst_ssid = pnetwork->network.MacAddress;