staging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Tue, 18 Jun 2019 01:07:03 +0000 (06:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 07:02:00 +0000 (09:02 +0200)
This patch tries to fix below issues reported by checkpatch

CHECK: Comparison to NULL could be written "!efuseTbl"
CHECK: Comparison to NULL could be written "!psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c

index 21f2365fa62796ee0f81364310b90ae7b7147d03..624188e18f2f20ee3c3bba0f84691812ac8c23aa 100644 (file)
@@ -1023,7 +1023,7 @@ static void hal_ReadEFuse_BT(
        }
 
        efuseTbl = rtw_malloc(EFUSE_BT_MAP_LEN);
-       if (efuseTbl == NULL) {
+       if (!efuseTbl) {
                DBG_8192C("%s: efuseTbl malloc fail!\n", __func__);
                return;
        }
@@ -2139,7 +2139,7 @@ static void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_l
                return;
 
        psta = pmlmeinfo->FW_sta_info[mac_id].psta;
-       if (psta == NULL)
+       if (!psta)
                return;
 
        shortGIrate = query_ra_short_GI(psta);