[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <03e36e1710ea4dfd07c3753d9a8df5746e59bc18.1617440834.git.fabioaiuto83@gmail.com>
Date: Sat, 3 Apr 2021 11:13:34 +0200
From: Fabio Aiuto <fabioaiuto83@...il.com>
To: gregkh@...uxfoundation.org
Cc: dan.carpenter@...cle.com, joe@...ches.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Fabio Aiuto <fabioaiuto83@...il.com>
Subject: [PATCH v3 12/30] staging: rtl8723bs: fix null check conditions in core/rtw_cmd.c
fix post-commit hook checkpatch issues:
CHECK: Comparison to NULL could be written "!psta"
178: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2012:
+ if (psta == NULL)
CHECK: Comparison to NULL could be written "!psta"
198: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2066:
+ if (psta == NULL)
CHECK: Comparison to NULL could be written "!psta"
211: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2081:
+ if (psta == NULL)
Signed-off-by: Fabio Aiuto <fabioaiuto83@...il.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 2086df056c44..840b9da9f2d9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -2009,7 +2009,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress);
if (!psta) {
psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress);
- if (psta == NULL)
+ if (!psta)
goto createbss_cmd_fail;
}
@@ -2063,7 +2063,7 @@ void rtw_setstaKey_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pc
struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *) (pcmd->rsp);
struct sta_info *psta = rtw_get_stainfo(pstapriv, psetstakey_rsp->addr);
- if (psta == NULL)
+ if (!psta)
goto exit;
exit:
@@ -2078,7 +2078,7 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *
struct set_assocsta_rsp *passocsta_rsp = (struct set_assocsta_rsp *) (pcmd->rsp);
struct sta_info *psta = rtw_get_stainfo(pstapriv, passocsta_parm->addr);
- if (psta == NULL)
+ if (!psta)
goto exit;
psta->aid = passocsta_rsp->cam_id;
--
2.20.1
Powered by blists - more mailing lists