linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: core: remove null check before vfree
@ 2021-08-28 17:54 Saurav Girepunje
  2021-08-28 19:20 ` Michael Straube
  2021-08-28 19:22 ` kernel test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Saurav Girepunje @ 2021-08-28 17:54 UTC (permalink / raw)
  To: Larry.Finger, phil, gregkh, fabioaiuto83, straube.linux,
	ross.schm.dev, linux-staging, linux-kernel
  Cc: saurav.girepunje

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

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-28 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28 17:54 [PATCH] staging: r8188eu: core: remove null check before vfree Saurav Girepunje
2021-08-28 19:20 ` Michael Straube
2021-08-28 19:30   ` Michael Straube
2021-08-28 19:47     ` Kari Argillander
2021-08-28 19:56       ` Michael Straube
2021-08-28 19:22 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).