Skip to contentSkip to conversation

mwifiex: remove an unneeded condition

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 4, 2015 – Dec 11, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mwifiex: remove an unneeded condition

We already know that "wep_key->key_length" is set so there is no need to check again. Also the last curly brace was indented too far.

drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +2 -3
index a6c8a4f..80f5064 100644
@@ -923,9 +923,8 @@ static int mwifiex_sec_ioctl_set_wep_key(struct mwifiex_private *priv,
 		if (encrypt_key->key_disable) {
 			memset(&priv->wep_key[index], 0,
 			       sizeof(struct mwifiex_wep_key));
-			if (wep_key->key_length)
-				goto done;
-			}
+			goto done;
+		}
 
 		if (adapter->key_api_major_ver = KEY_API_VER_MAJOR_V2)
 			enc_key = encrypt_key;
Applied
#1 lore raw
Quoted 5 lines

We already know that "wep_key->key_length" is set so there is no need to check again. Also the last curly brace was indented too far.

Thanks, applied to wireless-drivers-next.git.

Kalle Valo