summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVihas Makwana <makvihas@gmail.com>2022-04-27 19:57:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-06 00:19:15 +0300
commit3136dc602950d4c294bd82991b4eca4b626c87f3 (patch)
tree33f6d5fe5962c555a081d8dbd07530807f5fbef9
parent921f9c587013b5b216d9d3802cd3456b11c86524 (diff)
downloadlinux-3136dc602950d4c294bd82991b4eca4b626c87f3.tar.xz
staging: r8188eu: drop redundant check in _rtw_free_mlme_priv
There's a NULL check on pmlmepriv in rtw_mlme.c:112 which makes no sense as rtw_free_mlme_priv_ie_data() dereferences it unconditionally and it would have already crashed at this point. Remove this redundant check. Signed-off-by: Vihas Makwana <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220427165748.10584-1-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/core/rtw_mlme.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index a59763902517..c44e636d2c05 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -248,9 +248,7 @@ exit:
void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
{
rtw_free_mlme_priv_ie_data(pmlmepriv);
-
- if (pmlmepriv)
- vfree(pmlmepriv->free_bss_buf);
+ vfree(pmlmepriv->free_bss_buf);
}
struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)