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: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nathan Chancellor 2018-05-06 00:33:33 -07:00 committed by Greg Kroah-Hartman
parent 7aa48d37ae
commit 1cbe5fe261
1 changed files with 1 additions and 1 deletions

View File

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