mwifiex: remove an unneeded condition
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 4 Dec 2015 13:17:15 +0000 (16:17 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 11 Dec 2015 11:16:50 +0000 (13:16 +0200)
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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c

index a6c8a4f7bfe96aa44b5f46db60c29944abf5a79b..80f50645b59417e23e23a2882aacd06e3f5cc84f 100644 (file)
@@ -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;