From: Dan Carpenter Date: Fri, 4 Dec 2015 13:17:15 +0000 (+0300) Subject: mwifiex: remove an unneeded condition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97276c10cb45380ba5d5772b616fc33b55b5bf40;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index a6c8a4f7bfe9..80f50645b594 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -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;