[PATCH v2] staging: rtl8723bs: replace NULL comparison with NOT operator

Miguel Cyrineu Vale posted 1 patch 1 month, 2 weeks ago
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] staging: rtl8723bs: replace NULL comparison with NOT operator
Posted by Miguel Cyrineu Vale 1 month, 2 weeks ago
Fix checkpatch error "Comparison to NULL could be written "!psta"" in
ioctl_cfg80211.c:2432

Signed-off-by: Miguel Cyrineu Vale <miguelcvalealt@gmail.com>
---
Hey, thanks for the feedback on v1! This is still my first patch, so I'm
learning the ropes with the DCO and formatting.

Changes in v2:
- Use real name in Signed-off-by tag.
- Fix commit message line wrapping and remove unnecessary blank lines.
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index fd3bae31b0ed..8ae3adecafd9 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
 	spin_lock_bh(&pstapriv->asoc_list_lock);
 	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
 	spin_unlock_bh(&pstapriv->asoc_list_lock);
-	if (psta == NULL) {
+	if (!psta) {
 		ret = -ENOENT;
 		goto exit;
 	}
-- 
2.53.0
Re: [PATCH v2] staging: rtl8723bs: replace NULL comparison with NOT operator
Posted by Luka Gejak 1 month, 2 weeks ago
On April 27, 2026 9:37:59 PM GMT+02:00, Miguel Cyrineu Vale <miguelcvalealt@gmail.com> wrote:
>Fix checkpatch error "Comparison to NULL could be written "!psta"" in
>ioctl_cfg80211.c:2432
>
>Signed-off-by: Miguel Cyrineu Vale <miguelcvalealt@gmail.com>
>---
>Hey, thanks for the feedback on v1! This is still my first patch, so I'm
>learning the ropes with the DCO and formatting.

No problem, I'm here if you need any help and feel free to cc me in 
any future patch.

>
>Changes in v2:
>- Use real name in Signed-off-by tag.
>- Fix commit message line wrapping and remove unnecessary blank lines.
>---
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>index fd3bae31b0ed..8ae3adecafd9 100644
>--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>@@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
> 	spin_lock_bh(&pstapriv->asoc_list_lock);
> 	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
> 	spin_unlock_bh(&pstapriv->asoc_list_lock);
>-	if (psta == NULL) {
>+	if (!psta) {
> 		ret = -ENOENT;
> 		goto exit;
> 	}

LGTM,

Reviewed-by: Luka Gejak <luka.gejak@linux.dev>

Best regards,
Luka Gejak