Commit 7cd6f4b0 authored by Himadri Pandya's avatar Himadri Pandya Committed by Greg Kroah-Hartman

staging: rtl8723bs: hal: Remove comparison to NULL in rtl8723b_cmd.c

Remove comparison to NULL in file rtl8723b_cmd.c. Suggested by
Coccinelle.
Signed-off-by: default avatarHimadri Pandya <himadri18.07@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent da80ede2
...@@ -1480,7 +1480,7 @@ static void rtl8723b_set_FwRsvdPagePkt( ...@@ -1480,7 +1480,7 @@ static void rtl8723b_set_FwRsvdPagePkt(
MaxRsvdPageBufSize = RsvdPageNum*PageSize; MaxRsvdPageBufSize = RsvdPageNum*PageSize;
pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv); pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
if (pcmdframe == NULL) { if (!pcmdframe) {
DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__); DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__);
return; return;
} }
...@@ -1620,7 +1620,7 @@ static void rtl8723b_set_FwRsvdPagePkt( ...@@ -1620,7 +1620,7 @@ static void rtl8723b_set_FwRsvdPagePkt(
/* if the ap staion info. exists, get the kek, kck from staion info. */ /* if the ap staion info. exists, get the kek, kck from staion info. */
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv)); psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
if (psta == NULL) { if (!psta) {
memset(kek, 0, RTW_KEK_LEN); memset(kek, 0, RTW_KEK_LEN);
memset(kck, 0, RTW_KCK_LEN); memset(kck, 0, RTW_KCK_LEN);
DBG_8192C("%s, KEK, KCK download rsvd page all zero\n", __func__); DBG_8192C("%s, KEK, KCK download rsvd page all zero\n", __func__);
...@@ -1856,7 +1856,7 @@ static void rtl8723b_set_AP_FwRsvdPagePkt( ...@@ -1856,7 +1856,7 @@ static void rtl8723b_set_AP_FwRsvdPagePkt(
MaxRsvdPageBufSize = RsvdPageNum*PageSize; MaxRsvdPageBufSize = RsvdPageNum*PageSize;
pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv); pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
if (pcmdframe == NULL) { if (!pcmdframe) {
DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__); DBG_871X("%s: alloc ReservedPagePacket fail!\n", __func__);
return; return;
} }
...@@ -2069,7 +2069,7 @@ void rtl8723b_Add_RateATid( ...@@ -2069,7 +2069,7 @@ void rtl8723b_Add_RateATid(
u32 mask = bitmap&0x0FFFFFFF; u32 mask = bitmap&0x0FFFFFFF;
psta = pmlmeinfo->FW_sta_info[mac_id].psta; psta = pmlmeinfo->FW_sta_info[mac_id].psta;
if (psta == NULL) if (!psta)
return; return;
bw = psta->bw_mode; bw = psta->bw_mode;
...@@ -2107,7 +2107,7 @@ static void ConstructBtNullFunctionData( ...@@ -2107,7 +2107,7 @@ static void ConstructBtNullFunctionData(
pmlmeext = &padapter->mlmeextpriv; pmlmeext = &padapter->mlmeextpriv;
pmlmeinfo = &pmlmeext->mlmext_info; pmlmeinfo = &pmlmeext->mlmext_info;
if (NULL == StaAddr) { if (!StaAddr) {
memcpy(bssid, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(bssid, myid(&padapter->eeprompriv), ETH_ALEN);
StaAddr = bssid; StaAddr = bssid;
} }
...@@ -2176,7 +2176,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) ...@@ -2176,7 +2176,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter)
MaxRsvdPageBufSize = RsvdPageNum*PageSize; MaxRsvdPageBufSize = RsvdPageNum*PageSize;
pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv); pcmdframe = rtw_alloc_cmdxmitframe(pxmitpriv);
if (pcmdframe == NULL) { if (!pcmdframe) {
DBG_8192C("%s: alloc ReservedPagePacket fail!\n", __func__); DBG_8192C("%s: alloc ReservedPagePacket fail!\n", __func__);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment