diff options
author | Aishwarya Pant | 2017-04-10 15:43:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-04-11 07:34:14 +0200 |
commit | 7ad61a386bb804ae562966ae23baf5f4deee014b (patch) | |
tree | 7d00a81a62b2484d826cc522210bbb1b04f2ae6c /drivers/staging/rtl8723bs/os_dep/xmit_linux.c | |
parent | staging: rtl8723bs: Add missing include <linux/of.h> to fix compile error (diff) | |
download | kernel-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.c | 6 |
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) |