staging: rtl8723bs: fix comparison in if condition in core/rtw_recv.c
authorFabio Aiuto <fabioaiuto83@gmail.com>
Sun, 4 Apr 2021 14:09:39 +0000 (16:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Apr 2021 10:16:16 +0000 (12:16 +0200)
fix post-commit checkpatch issue:

CHECK: Using comparison to false is error prone
27: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:381:
+ if (psecuritypriv->
bcheck_grpkey == false &&

and fix the same issue in second comparison to true
inside the same if condition
IS_MCAST(prxattrib->ra) == true
^^^^^^^

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4b363edbc2da36cb3c63edbcd43e3285754768c9.1617545239.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_recv.c

index bf53695f9f7d35e2b6e9d245a3ef0149cdb85bbf..eac663119290fb0cacbbb70139fae770e0078287 100644 (file)
@@ -378,8 +378,8 @@ static signed int recvframe_chkmic(struct adapter *adapter,  union recv_frame *p
 
                        } else {
                                /* mic checked ok */
-                               if (psecuritypriv->bcheck_grpkey == false &&
-                                   IS_MCAST(prxattrib->ra) == true)
+                               if (!psecuritypriv->bcheck_grpkey &&
+                                   IS_MCAST(prxattrib->ra))
                                        psecuritypriv->bcheck_grpkey = true;
                        }
                }