]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8188eu: core: Remove NULL test before vfree
authorShyam Saini <mayhs11saini@gmail.com>
Mon, 16 Jan 2017 04:18:19 +0000 (09:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 10:32:29 +0000 (11:32 +0100)
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>
drivers/staging/rtl8188eu/core/rtw_xmit.c

index 484d20af2420a72470783dd91bdf74b089fcf5e6..630fdc33d58a8ef67871c09f86d166b81e1e9264 100644 (file)
@@ -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);