]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8723bs: remove unnecessary null check
authorYueHaibing <yuehaibing@huawei.com>
Tue, 15 Oct 2019 11:55:11 +0000 (19:55 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Oct 2019 16:35:00 +0000 (18:35 +0200)
Null check before kfree is redundant, so remove it.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191015115511.26560-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_xmit.c

index 7011c2aa25cb238d6dc784b168ca33b4a0265ca5..6d193f137b7e418d2fcc221977da7be5057e0f23 100644 (file)
@@ -2206,12 +2206,9 @@ s32 rtw_alloc_hwxmits(struct adapter *padapter)
 
 void rtw_free_hwxmits(struct adapter *padapter)
 {
-       struct hw_xmit *hwxmits;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
 
-       hwxmits = pxmitpriv->hwxmits;
-       if (hwxmits)
-               kfree(hwxmits);
+       kfree(pxmitpriv->hwxmits);
 }
 
 void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)