From: Fabio Aiuto Date: Wed, 7 Apr 2021 13:49:31 +0000 (+0200) Subject: drivers: rtl8723bs: rewrite comparison to null X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=394ceaa2b3b27f67f143477086642087155a11b3;p=linux.git drivers: rtl8723bs: rewrite comparison to null fix following post-commit hook checkpatch warnings: CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115: + if (psta == NULL) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0c6d53c851d1b07eb0183108e0bad7b4f273f04b.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 30afe9f4ceefb..e7712391a87d4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -2103,7 +2103,7 @@ void rtw_ap_restore_network(struct adapter *padapter) for (i = 0; i < chk_alive_num; i++) { psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]); - if (psta == NULL) + if (!psta) continue; if (psta->state & _FW_LINKED) {