mirror of https://gitee.com/openkylin/linux.git
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:
parent
4f68ef64cd
commit
90a8c74a8d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue