[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190609124851.GA4043@hari-Inspiron-1545>
Date: Sun, 9 Jun 2019 18:18:51 +0530
From: Hariprasad Kelam <hariprasad.kelam@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hariprasad Kelam <hariprasad.kelam@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
Michael Straube <straube.linux@...il.com>,
Arnd Bergmann <arnd@...db.de>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] 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@...il.com>
---
drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 4e4e565..c125ac2 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);
--
2.7.4
Powered by blists - more mailing lists