staging: rtl8712: Fix checkpatch.pl warning
authorAlexander Mikhalevich <alex.mikhalevich@gmail.com>
Sat, 25 Feb 2017 20:42:08 +0000 (23:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:03 +0000 (09:17 +0100)
WARNING: Avoid multiple line dereference - prefer 'param->u.crypt.key'

Signed-off-by: Alexander Mikhalevich <alex.mikhalevich@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c

index f4167f1..0322795 100644 (file)
@@ -100,10 +100,10 @@ static inline void handle_pairwise_key(struct sta_info *psta,
        memcpy(psta->x_UncstKey.skey, param->u.crypt.key,
               (param->u.crypt. key_len > 16 ? 16 : param->u.crypt.key_len));
        if (strcmp(param->u.crypt.alg, "TKIP") == 0) { /* set mic key */
-               memcpy(psta->tkiptxmickey. skey, &(param->u.crypt.
-                       key[16]), 8);
-               memcpy(psta->tkiprxmickey. skey, &(param->u.crypt.
-                       key[24]), 8);
+               memcpy(psta->tkiptxmickey. skey,
+                      &(param->u.crypt.key[16]), 8);
+               memcpy(psta->tkiprxmickey. skey,
+                      &(param->u.crypt.key[24]), 8);
                padapter->securitypriv. busetkipkey = false;
                mod_timer(&padapter->securitypriv.tkip_timer,
                          jiffies + msecs_to_jiffies(50));