aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
diff options
context:
space:
mode:
authorVatsala Narang <vatsalanarang@gmail.com>2019-05-01 16:05:47 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-01 18:18:02 +0200
commit3343712444e5045f8c4dae54f9e584b603a93641 (patch)
tree6884afe026fe0dd00686588fe8defd867f349b54 /drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
parentstaging: rtl8723bs: core: Prefer using the BIT Macro. (diff)
downloadlinux-dev-3343712444e5045f8c4dae54f9e584b603a93641.tar.xz
linux-dev-3343712444e5045f8c4dae54f9e584b603a93641.zip
staging: rtl8723bs: core: Use !x in place of NULL comparison.
Avoid NULL comparison, compare using boolean operator. Issue found using coccinelle. Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_sta_mgt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index 67b8840ee2fd..bdc52d8d5625 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -316,7 +316,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
struct sta_priv *pstapriv = &padapter->stapriv;
struct hw_xmit *phwxmit;
- if (psta == NULL)
+ if (!psta)
goto exit;
@@ -520,7 +520,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
u8 *addr;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- if (hwaddr == NULL)
+ if (!hwaddr)
return NULL;
if (IS_MCAST(hwaddr))
@@ -565,7 +565,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
- if (psta == NULL) {
+ if (!psta) {
res = _FAIL;
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail"));
goto exit;