]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8723bs: hal: Remove comparison to NULL in hal_com.c
authorHimadri Pandya <himadri18.07@gmail.com>
Sun, 17 Mar 2019 06:14:58 +0000 (11:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:06:07 +0000 (07:06 +0100)
Remove comparison to NULL in file hal_com.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_com.c

index 7f8ec55b08f1ab45595ebc6dccda7d1bc0fc397c..b97b53c34449a7b4958d0f0542ae3c5e843e0b9f 100644 (file)
@@ -18,7 +18,7 @@ u8 rtw_hal_data_init(struct adapter *padapter)
        if (is_primary_adapter(padapter)) {     /* if (padapter->isprimary) */
                padapter->hal_data_sz = sizeof(struct hal_com_data);
                padapter->HalData = vzalloc(padapter->hal_data_sz);
-               if (padapter->HalData == NULL) {
+               if (!padapter->HalData) {
                        DBG_8192C("cannot alloc memory for HAL DATA\n");
                        return _FAIL;
                }
@@ -909,7 +909,7 @@ s32 c2h_evt_read_88xx(struct adapter *adapter, u8 *buf)
        int i;
        u8 trigger;
 
-       if (buf == NULL)
+       if (!buf)
                goto exit;
 
        trigger = rtw_read8(adapter, REG_C2HEVT_CLEAR);
@@ -982,7 +982,7 @@ void rtw_hal_update_sta_rate_mask(struct adapter *padapter, struct sta_info *pst
        u8 i, rf_type, limit;
        u32 tx_ra_bitmap;
 
-       if (psta == NULL)
+       if (!psta)
                return;
 
        tx_ra_bitmap = 0;
@@ -1407,7 +1407,7 @@ bool GetHexValueFromString(char *szStr, u32 *pu4bVal, u32 *pu4bMove)
        char *szScan = szStr;
 
        /*  Check input parameter. */
-       if (szStr == NULL || pu4bVal == NULL || pu4bMove == NULL) {
+       if (!szStr || !pu4bVal || !pu4bMove) {
                DBG_871X("GetHexValueFromString(): Invalid input arguments! szStr: %p, pu4bVal: %p, pu4bMove: %p\n",
                         szStr, pu4bVal, pu4bMove);
                return false;