OSDN Git Service

staging: rt8192u: Move constant in comparison to the RHS
authorSimone Serra <serrazimone@gmail.com>
Tue, 23 Feb 2021 23:41:02 +0000 (00:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:25:28 +0000 (09:25 +0100)
Fixes checkpatch warning:

WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Simone Serra <serrazimone@gmail.com>
Link: https://lore.kernel.org/r/20210223234102.15784-1-serrazimone@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_wx.c

index d853586..175bb8b 100644 (file)
@@ -726,7 +726,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
                        idx--;
                group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY;
 
-               if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || (alg ==  KEY_TYPE_WEP40)) {
+               if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) || (alg ==  KEY_TYPE_WEP40)) {
                        if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40))
                                alg = KEY_TYPE_WEP104;
                        ieee->pairwise_key_type = alg;