Commit 1cbe5fe2 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman

staging: wilc1000: Remove unnecessary array index check

This statment triggers GCC's -Wtype-limit since key_index is an
unsigned integer so it cannot be less than zero.
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7aa48d37
......@@ -1054,7 +1054,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
}
}
if (key_index >= 0 && key_index <= 3 && priv->wep_key_len[key_index]) {
if (key_index <= 3 && priv->wep_key_len[key_index]) {
memset(priv->wep_key[key_index], 0,
priv->wep_key_len[key_index]);
priv->wep_key_len[key_index] = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment