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>
This commit is contained in:
YueHaibing 2018-12-19 11:00:13 +08:00 committed by Kalle Valo
parent 4f68ef64cd
commit 90a8c74a8d
2 changed files with 4 additions and 11 deletions

View File

@ -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;
}

View File

@ -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;