From: Vihas Makwana Date: Wed, 27 Apr 2022 16:57:49 +0000 (+0530) Subject: staging: r8188eu: drop redundant check in _rtw_free_mlme_priv X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3136dc602950d4c294bd82991b4eca4b626c87f3;p=linux.git 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 Link: https://lore.kernel.org/r/20220427165748.10584-1-makvihas@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index a597639025170..c44e636d2c05e 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)