summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
diff options
context:
space:
mode:
authorAishwarya Pant2017-04-10 15:43:50 +0200
committerGreg Kroah-Hartman2017-04-11 07:34:14 +0200
commit7ad61a386bb804ae562966ae23baf5f4deee014b (patch)
tree7d00a81a62b2484d826cc522210bbb1b04f2ae6c /drivers/staging/rtl8723bs/os_dep/xmit_linux.c
parentstaging: rtl8723bs: Add missing include <linux/of.h> to fix compile error (diff)
downloadkernel-qcow2-linux-7ad61a386bb804ae562966ae23baf5f4deee014b.tar.gz
kernel-qcow2-linux-7ad61a386bb804ae562966ae23baf5f4deee014b.tar.xz
kernel-qcow2-linux-7ad61a386bb804ae562966ae23baf5f4deee014b.zip
staging: rtl8723bs: remove null test before kfree
kfree(..) on a NULL pointer is a no-op; the null test here is redundant. Detected by coccicheck. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep/xmit_linux.c')
-rw-r--r--drivers/staging/rtl8723bs/os_dep/xmit_linux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 66dfec18f770..76968161f936 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -76,10 +76,8 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag)
{
- if (free_sz > 0) {
- if (pxmitbuf->pallocated_buf)
- kfree(pxmitbuf->pallocated_buf);
- }
+ if (free_sz > 0)
+ kfree(pxmitbuf->pallocated_buf);
}
#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)