Skip to contentSkip to conversation

rtl8188eu: core: Remove NULL test before vfree

PATCH New Shyam Saini 1 participant 1 message Jan 16, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtl8188eu: core: Remove NULL test before vfree

vfree frees the virtually continuous block of memory beginning at addr. If addr is NULL, no operation is performed. So, NULL test is not needed before vfree().

---
 drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_xmit.c +1 -2
index b60b126..2a65e32 100644
@@ -246,8 +246,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
 		pxmitbuf++;
 	}
 
-	if (pxmitpriv->pallocated_xmit_extbuf)
-		vfree(pxmitpriv->pallocated_xmit_extbuf);
+	vfree(pxmitpriv->pallocated_xmit_extbuf);
 
 	rtw_free_hwxmits(padapter);
 
Signature · 1 line
2.7.4