Przeglądaj źródła

staging: 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().

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shyam Saini 8 lat temu
rodzic
commit
f17331eb4b
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      drivers/staging/rtl8188eu/core/rtw_xmit.c

+ 1 - 2
drivers/staging/rtl8188eu/core/rtw_xmit.c

@@ -246,8 +246,7 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
 		pxmitbuf++;
 		pxmitbuf++;
 	}
 	}
 
 
-	if (pxmitpriv->pallocated_xmit_extbuf)
-		vfree(pxmitpriv->pallocated_xmit_extbuf);
+	vfree(pxmitpriv->pallocated_xmit_extbuf);
 
 
 	rtw_free_hwxmits(padapter);
 	rtw_free_hwxmits(padapter);