diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c index 9f4a10aaa774..fe3891106a6d 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c @@ -1480,7 +1480,7 @@ static void rtl8723b_set_FwRsvdPagePkt( MaxRsvdPageBufSize = RsvdPageNum*PageSize; pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv); - if (pcmdframe == NULL) { + if (!pcmdframe) { DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__); return; } @@ -1620,7 +1620,7 @@ static void rtl8723b_set_FwRsvdPagePkt( /* if the ap staion info. exists, get the kek, kck from staion info. */ psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv)); - if (psta == NULL) { + if (!psta) { memset(kek, 0, RTW_KEK_LEN); memset(kck, 0, RTW_KCK_LEN); DBG_8192C("%s, KEK, KCK download rsvd page all zero\n", __func__); @@ -1856,7 +1856,7 @@ static void rtl8723b_set_AP_FwRsvdPagePkt( MaxRsvdPageBufSize = RsvdPageNum*PageSize; pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv); - if (pcmdframe == NULL) { + if (!pcmdframe) { DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__); return; } @@ -2069,7 +2069,7 @@ void rtl8723b_Add_RateATid( u32 mask = bitmap&0x0FFFFFFF; psta = pmlmeinfo->FW_sta_info[mac_id].psta; - if (psta == NULL) + if (!psta) return; bw = psta->bw_mode; @@ -2107,7 +2107,7 @@ static void ConstructBtNullFunctionData( pmlmeext = &padapter->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; - if (NULL == StaAddr) { + if (!StaAddr) { memcpy(bssid, myid(&padapter->eeprompriv), ETH_ALEN); StaAddr = bssid; } @@ -2176,7 +2176,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) MaxRsvdPageBufSize = RsvdPageNum*PageSize; pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv); - if (pcmdframe == NULL) { + if (!pcmdframe) { DBG_8192C("%s: alloc ReservedPagePacket fail!\n", __func__); return; }