Commit 92546959 authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Greg Kroah-Hartman

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: default avatarHariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 117e9dcf
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment