aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHariprasad Kelam <hariprasad.kelam@gmail.com>2019-06-09 18:18:51 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-10 17:56:00 +0200
commit9254695963a2380d7e8d66a135847ac6a83bba65 (patch)
treed91fbff4f2df5bebce2156104a2d7090d1ebb442
parentstaging: rtl8723bs: hal: move common code to macro (diff)
staging: rtl8723bs: fix warning comparison to NULL
This patch fixes below issue reported by checkpatch CHECK: Comparison to NULL could be written "!pxmitbuf->pallocated_buf" + if (pxmitbuf->pallocated_buf == NULL) Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8723bs/os_dep/xmit_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 4e4e565d991c..c125ac28e7dc 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -50,7 +50,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
{
if (alloc_sz > 0) {
pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
- if (pxmitbuf->pallocated_buf == NULL)
+ if (!pxmitbuf->pallocated_buf)
return _FAIL;
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);