[PATCH] staging: r8188eu: core: remove null check before vfree

From: Saurav Girepunje
Date: Sat Aug 28 2021 - 14:04:12 EST


Remove NULL check. NULL check before freeing function is not needed.

Signed-off-by: Saurav Girepunje <saurav.girepunje@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_sta_mgt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
index f6dffed53a60..4726771a8403 100644
--- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
@@ -155,9 +155,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
spin_unlock_bh(&pstapriv->sta_hash_lock);
/*===============================*/

- if (pstapriv->pallocated_stainfo_buf)
- vfree(pstapriv->pallocated_stainfo_buf);
- }
+ vfree(pstapriv->pallocated_stainfo_buf);

return _SUCCESS;
}
--
2.32.0