diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-12-19 11:00:13 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-12-20 08:50:11 +0200 |
commit | 90a8c74a8d7b0f3fdceadadb155da137e3b157cf (patch) | |
tree | 65c2c30c89b69f45919dd77a1cf61ed22b7b713d /drivers/net/wireless/intel/ipw2x00 | |
parent | 4f68ef64cd7feb1220232bd8f501d8aad340a099 (diff) | |
download | lwn-90a8c74a8d7b0f3fdceadadb155da137e3b157cf.tar.gz lwn-90a8c74a8d7b0f3fdceadadb155da137e3b157cf.zip |
ipw2x00: cleanup dead code
Fix smatch warning:
drivers/net/wireless/intel/ipw2x00/ipw2100.c:5606
shim__set_security() warn: always true condition '(sec->active_key <= 3) => (0-3 <= 3)'
drivers/net/wireless/intel/ipw2x00/ipw2200.c:10725
shim__set_security() warn: always true condition '(sec->active_key <= 3) => (0-3 <= 3)'
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/ipw2x00')
-rw-r--r-- | drivers/net/wireless/intel/ipw2x00/ipw2100.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/intel/ipw2x00/ipw2200.c | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 910db46db6a1..b58ef8dd1e47 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@ -5603,12 +5603,8 @@ static void shim__set_security(struct net_device *dev, if ((sec->flags & SEC_ACTIVE_KEY) && priv->ieee->sec.active_key != sec->active_key) { - if (sec->active_key <= 3) { - priv->ieee->sec.active_key = sec->active_key; - priv->ieee->sec.flags |= SEC_ACTIVE_KEY; - } else - priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY; - + priv->ieee->sec.active_key = sec->active_key; + priv->ieee->sec.flags |= SEC_ACTIVE_KEY; priv->status |= STATUS_SECURITY_UPDATED; } diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index bbdca13c5a9f..fa400f92d7e2 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -10722,11 +10722,8 @@ static void shim__set_security(struct net_device *dev, } if (sec->flags & SEC_ACTIVE_KEY) { - if (sec->active_key <= 3) { - priv->ieee->sec.active_key = sec->active_key; - priv->ieee->sec.flags |= SEC_ACTIVE_KEY; - } else - priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY; + priv->ieee->sec.active_key = sec->active_key; + priv->ieee->sec.flags |= SEC_ACTIVE_KEY; priv->status |= STATUS_SECURITY_UPDATED; } else priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY; |