Commit 8d1dcc72 authored by Aaron Lawrence's avatar Aaron Lawrence Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: rtllib_crypt_tkip: fixes on unbalanced braces



Added braces around needed arms of statements which needs them
in accordance with the Linux kernel coding-style regulations.
The issues were found with the help of the checkpatch script.

Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: default avatarAaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/641d8360c5f86b54efc96d7f8ef70be1371db480.1666787061.git.t4rmin@zohomail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcbdcfca
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -276,8 +276,9 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
		}
		tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak,
				   tkey->tx_iv16);
	} else
	} else {
		tkey->tx_phase1_done = 1;
	}

	len = skb->len - hdr_len;
	pos = skb_push(skb, 8);
@@ -610,10 +611,11 @@ static int rtllib_tkip_set_key(void *key, int len, u8 *seq, void *priv)
				(seq[3] << 8) | seq[2];
			tkey->rx_iv16 = (seq[1] << 8) | seq[0];
		}
	} else if (len == 0)
	} else if (len == 0) {
		tkey->key_set = 0;
	else
	} else {
		return -1;
	}

	return 0;
}