staging: rtl8723bs: hal: Remove comparison to NULL in hal_btcoex.c
authorHimadri Pandya <himadri18.07@gmail.com>
Sun, 17 Mar 2019 06:14:59 +0000 (11:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:06:08 +0000 (07:06 +0100)
- Remove comparison to NULL in file hal_btcoex.c. Suggested by
Coccinelle.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_btcoex.c

index 2b43f6d3c76244e5f4587009a8c7a9475ab90456..ffc345b6e0c94d59c9b92ca35f6e5417686e5ae0 100644 (file)
@@ -75,7 +75,7 @@ static BTCDBGINFO GLBtcDbgInfo;
 
 static void DBG_BT_INFO_INIT(PBTCDBGINFO pinfo, u8 *pbuf, u32 size)
 {
-       if (NULL == pinfo)
+       if (!pinfo)
                return;
 
        memset(pinfo, 0, sizeof(BTCDBGINFO));
@@ -95,7 +95,7 @@ void DBG_BT_INFO(u8 *dbgmsg)
 
        pinfo = &GLBtcDbgInfo;
 
-       if (NULL == pinfo->info)
+       if (!pinfo->info)
                return;
 
        msglen = strlen(dbgmsg);
@@ -112,8 +112,7 @@ void DBG_BT_INFO(u8 *dbgmsg)
 /*  */
 static u8 halbtcoutsrc_IsBtCoexistAvailable(PBTC_COEXIST pBtCoexist)
 {
-       if (!pBtCoexist->bBinded ||
-               NULL == pBtCoexist->Adapter){
+       if (!pBtCoexist->bBinded || !pBtCoexist->Adapter){
                return false;
        }
        return true;
@@ -1571,7 +1570,7 @@ void hal_btcoex_SetDBG(struct adapter *padapter, u32 *pDbgModule)
        u32 i;
 
 
-       if (NULL == pDbgModule)
+       if (!pDbgModule)
                return;
 
        for (i = 0; i < BTC_MSG_MAX; i++)
@@ -1585,7 +1584,7 @@ u32 hal_btcoex_GetDBG(struct adapter *padapter, u8 *pStrBuf, u32 bufSize)
        u32 leftSize;
 
 
-       if ((NULL == pStrBuf) || (0 == bufSize))
+       if (!pStrBuf || (0 == bufSize))
                return 0;
 
        pstr = pStrBuf;