From 53a768581944291dc7a811cf778e9a10c7ce24fb Mon Sep 17 00:00:00 2001 From: Saurav Girepunje Date: Sun, 29 Aug 2021 22:30:09 +0530 Subject: [PATCH] staging: r8188eu: core: remove null check before vfree Remove NULL check. NULL check before freeing function is not needed. Correct the indentation. Reviewed-by: Dan Carpenter Acked-by: Michael Straube Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/YSu9GQa1A3s6FYQx@user Signed-off-by: Greg Kroah-Hartman --- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index f6dffed53a60..c3600cb1790a 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -155,9 +155,8 @@ 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.11.0